1 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3 * Makefile.in (SFILES): Add "common/environ.c".
4 (OBJS): Add "common/environ.h".
6 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8 * configure.ac: Check if the fs_base and gs_base members of
9 `struct user_regs_struct' exist.
10 * config.in: Regenerated.
11 * configure: Likewise.
13 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
15 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
17 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
18 (get_next_pcs_syscall_next_pc): Likewise.
20 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
22 * win32-i386-low.c: Fix incorrect reference to a couple source files.
23 * nto-x86-low.c: Likewise.
25 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
27 * Makefile.in: Include disable-implicit-rules.mk.
29 2016-11-23 Pedro Alves <palves@redhat.com>
31 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
32 (debug_vprintf): Use std::chrono::steady_clock instead of
33 gettimeofday. Use '.' instead of ':'.
34 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
35 (get_timestamp): Use std::chrono::steady_clock instead of
38 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
40 * Makefile.in: Fix whitespace formatting.
42 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
44 * Makefile.in (SFILES, OBS): Flatten list and order
47 2016-11-23 Pedro Alves <palves@redhat.com>
49 * event-loop.c (handle_file_event): Use warning.
50 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
51 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
54 2016-11-23 Pedro Alves <palves@redhat.com>
56 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
58 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
59 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
60 debug_printf and debug_flush for debug output.
61 * server.c (handle_general_set): Likewise.
62 * thread-db.c (try_thread_db_load): Use debug_printf for debug
65 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
67 * Makefile.in (.c.o): Replace rule with ...
68 (%.o: %.c): ... this one.
70 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
72 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
73 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
75 * configure.ac: Remove checks for the make program.
76 * configure: Re-generate.
78 2016-10-28 Pedro Alves <palves@redhat.com>
80 * Makefile.in (CXX_DIALECT): Get from configure.
81 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
82 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
83 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
84 * config.in: Regenerate.
85 * configure: Regenerate.
87 2016-10-27 Yao Qi <yao.qi@linaro.org>
89 * linux-low.c (linux_supports_range_stepping): Return true if
90 can_software_single_step return true.
92 2016-10-27 Yao Qi <yao.qi@linaro.org>
94 * inferiors.c (find_inferior_in_random): New function.
95 * inferiors.h (find_inferior_in_random): Declare.
96 * linux-low.c (linux_wait_for_event_filtered): Call
97 find_inferior_in_random instead of find_inferior.
99 2016-10-27 Yao Qi <yao.qi@linaro.org>
101 * linux-low.c (linux_wait_1): If single-step breakpoints are
102 inserted, remove them.
104 2016-10-26 Pedro Alves <palves@redhat.com>
106 * linux-low.c (handle_extended_wait): Link parent/child fork
108 (linux_wait_1): Unlink them.
109 (linux_set_resume_request): Ignore resume requests for
110 already-resumed and unhandled fork child threads.
111 * linux-low.h (struct lwp_info) <fork_relative>: New field.
112 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
114 (handle_v_requests) <vCont>: Don't call require_running.
115 * server.h (in_queued_stop_replies): New declaration.
117 2016-10-24 Yao Qi <yao.qi@linaro.org>
120 * linux-aarch64-low.c (append_insns): Cast the return value to
123 2016-10-10 Yao Qi <yao.qi@linaro.org>
125 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
127 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
129 * target.c (target_supports_multi_process): New function, moved
131 * target.h (target_supports_multi_process): ... here. Remove
134 2016-10-05 Tom Tromey <tom@tromey.com>
137 * tracepoint.c (handle_tracepoint_bkpts): Check
138 ipa_error_tracepoint, not ipa_stopping_tracepoint.
140 2016-10-05 Yao Qi <yao.qi@linaro.org>
142 * configure.srv: Update the path of arm-*.xml files.
144 2016-10-05 Terry Guo <terry.guo@arm.com>
145 Yao Qi <yao.qi@linaro.org>
147 * Makefile.in: Adjust the path of rules.
148 * configure.srv: Update the path of xml files.
149 * regformats/arm-with-iwmmxt.dat: Regenerated.
150 * regformats/arm-with-neon.dat: Likewise.
151 * regformats/arm-with-vfpv2.dat: Likewise.
152 * regformats/arm-with-vfpv3.dat Likewise.
154 2016-09-30 Yao Qi <yao.qi@linaro.org>
157 * target.c (target_stop_and_wait): Don't call
158 target_continue_no_signal, use resume_stop instead.
160 2016-09-26 Yao Qi <yao.qi@linaro.org>
162 * linux-low.c (linux_wait_1): Call debug_exit.
164 2016-09-23 Pedro Alves <palves@redhat.com>
166 * Makefile.in (SFILES): Add common/new-op.c.
167 (OBS): Add common/new-op.o.
168 (new-op.o): New rule.
170 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
172 * .gitinore: Ignore more files.
174 2016-09-21 Yao Qi <yao.qi@linaro.org>
176 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
179 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
181 * server.c (start_inferior): Call target_mourn_inferior instead of
182 mourn_inferior; pass ptid_t argument to it.
184 (handle_target_event): Likewise.
185 * target.c (target_mourn_inferior): New function.
186 * target.h (mourn_inferior): Delete macro.
188 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
190 * linux-low.c (lwp_is_stepping): New function.
192 2016-09-06 Carl Love <cel@us.ibm.com>
194 * server.c (start_inferior): Fixed comment, requested comment change
195 didn't get updated correctly. Removed reference to ptrace () call as
196 it is only true on Linux systems.
198 2016-09-06 Carl Love <cel@us.ibm.com>
200 * server.c (start_inferior): Do not call
201 function target_post_create_inferior () if the
202 inferior process has already exited.
204 2016-09-05 Pedro Alves <palves@redhat.com>
206 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
207 (COMPILE.pre, CC_LD): Use CXX directly.
208 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
209 * acinclude.m4: Don't include build-with-cxx.m4.
210 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
211 * configure: Regenerate.
213 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
216 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
217 call writing data to own_buf.
219 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
221 * target.c (mywait): Call target_wait instead of
223 (target_wait): New function.
225 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
227 * server.c (start_inferior): New variable 'ptid'. Replace calls
228 to the_target->resume by target_continue{,_no_signal}, depending
230 * target.c (target_stop_and_wait): Call target_continue_no_signal
231 instead of the_target->resume.
232 (target_continue): New function.
234 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
236 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
238 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
241 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
243 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
244 * linux-arm-low.c (ps_get_thread_area): Likewise.
245 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
246 * linux-m68k-low.c (ps_get_thread_area): Likewise.
247 * linux-mips-low.c (ps_get_thread_area): Likewise.
248 * linux-nios2-low.c (ps_get_thread_area): Likewise.
249 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
250 * linux-x86-low.c (ps_get_thread_area): Likewise.
251 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
253 2016-08-19 Pedro Alves <palves@redhat.com>
255 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
257 2016-08-19 Pedro Alves <palves@redhat.com>
259 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
260 comment. Use memcpy instead of casting through unsigned long.
262 2016-08-19 Pedro Alves <palves@redhat.com>
264 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
265 allocating around 0x80000000.
267 2016-08-19 Pedro Alves <palves@redhat.com>
270 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
271 (x32-avx512-linux-ipa.o): New rules.
272 * configure.ac (x86_64-*-linux*): New x32 check.
273 * configure.srv (ipa_x32_linux_regobj): New.
274 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
275 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
277 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
279 * configure: Regenerate.
281 2016-08-09 Pedro Alves <palves@redhat.com>
284 * Makefile.in (OBS): Add signals-state-save-restore.o.
285 (signals-state-save-restore.o): New rule.
286 * config.in: Regenerate.
287 * configure: Regenerate.
288 * linux-low.c: Include "signals-state-save-restore.h".
289 (linux_create_inferior): Call
290 restore_original_signals_state.
291 * server.c: Include "dispositions-save-restore.h".
292 (captured_main): Call save_original_signals_state.
294 2016-08-05 Pedro Alves <palves@redhat.com>
296 * configure: Regenerate.
298 2016-08-04 Yao Qi <yao.qi@linaro.org>
300 * linux-low.c (regsets_fetch_inferior_registers): Check
301 errno is ESRCH or not.
303 2016-08-02 Yao Qi <yao.qi@linaro.org>
305 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
306 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
307 (thread_db_load_search): Update.
308 (try_thread_db_load_1): Don't look for td_ta_event_addr,
309 td_ta_set_event and td_ta_event_getmsg.
311 2016-07-26 Pedro Alves <palves@redhat.com>
314 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
315 of unsigned long for 64-bit registers and use uint32_t instead of
316 unsigned int for 32-bit registers.
318 2016-07-26 Pedro Alves <palves@redhat.com>
320 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
323 2016-07-21 Tom Tromey <tom@tromey.com>
325 * configure: Rebuild.
327 2016-07-21 Yao Qi <yao.qi@linaro.org>
329 * mem-break.c (find_gdb_breakpoint): Cast bp to
330 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
332 2016-07-21 Yao Qi <yao.qi@linaro.org>
334 * server.c (handle_v_requests): Support s and S actions
335 if target_supports_software_single_step return true.
337 2016-07-21 Yao Qi <yao.qi@linaro.org>
339 * linux-low.c (resume_stopped_resumed_lwps): If resume request
340 is resume_step, call maybe_hw_step.
341 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
343 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
345 (proceed_one_lwp): If resume request is resume_step, install
346 reinsert breakpoints and call maybe_hw_step.
348 2016-07-21 Yao Qi <yao.qi@linaro.org>
350 * linux-low.c (proceed_one_lwp): Declare.
351 (linux_resume_one_thread): Remove local variable 'step'.
352 Lift code enqueue signal. Call proceed_one_lwp instead of
353 linux_resume_one_lwp.
355 2016-07-21 Yao Qi <yao.qi@linaro.org>
357 * linux-low.c (linux_resume_one_thread): Call
358 enqueue_pending_signal.
360 2016-07-21 Yao Qi <yao.qi@linaro.org>
362 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
363 * inferiors.c (do_restore_current_thread_cleanup): New function.
364 (make_cleanup_restore_current_thread): Likewise.
365 * linux-low.c (install_software_single_step_breakpoints): Call
366 make_cleanup_restore_current_thread. Switch current_thread to
369 2016-07-21 Yao Qi <yao.qi@linaro.org>
371 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
372 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
373 (clone_one_breakpoint): Likewise.
374 (delete_reinsert_breakpoints): Change parameter to thread.
376 (has_reinsert_breakpoints): Likewise.
377 (uninsert_reinsert_breakpoints): Likewise.
378 (reinsert_reinsert_breakpoints): Likewise.
379 * mem-break.h (set_reinsert_breakpoint): Update declaration.
380 (delete_reinsert_breakpoints): Likewise.
381 (reinsert_reinsert_breakpoints): Likewise.
382 (uninsert_reinsert_breakpoints): Likewise.
383 (has_reinsert_breakpoints): Likewise.
385 2016-07-21 Yao Qi <yao.qi@linaro.org>
387 * inferiors.c (get_thread_process): Make parameter const.
388 * inferiors.h (get_thread_process): Update declaration.
389 * mem-break.c (clone_all_breakpoints): Remove all parameters.
390 Add new parameters child_thread and parent_thread. Callers
392 * mem-break.h (clone_all_breakpoints): Update declaration.
394 2016-07-21 Yao Qi <yao.qi@linaro.org>
396 * mem-break.c (struct breakpoint) <cond_list>: Remove.
397 <command_list, handler>: Remove.
398 (struct gdb_breakpoint): New.
399 (struct other_breakpoint): New.
400 (struct reinsert_breakpoint): New.
401 (is_gdb_breakpoint): New function.
402 (any_persistent_commands): Update command_list if
403 is_gdb_breakpoint returns true.
404 (set_breakpoint): Create breakpoints according to their types.
405 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
406 (set_gdb_breakpoint_1): Likewise.
407 (set_gdb_breakpoint): Likewise.
408 (clear_breakpoint_conditions): Change parameter type to
409 'struct gdb_breakpoint *'.
410 (clear_breakpoint_commands): Likewise.
411 (clear_breakpoint_conditions_and_commands): Likewise.
412 (add_condition_to_breakpoint): Likewise.
413 (add_breakpoint_condition): Likewise.
414 (add_commands_to_breakpoint): Likewise.
415 (check_breakpoints): Check other_breakpoint.
416 (clone_one_breakpoint): Clone breakpopint according to its type.
417 * mem-break.h (struct gdb_breakpoint): Declare.
418 (set_gdb_breakpoint): Update declaration.
419 (clear_breakpoint_conditions_and_commands): Likewise.
420 (add_breakpoint_condition): Likewise.
421 (add_breakpoint_commands): Likewise.
422 * server.c (process_point_options): Change parameter type to
423 'struct gdb_breakpoint *'.
425 2016-07-21 Yao Qi <yao.qi@linaro.org>
427 * mem-break.c (set_breakpoint_at): Rename it to ...
428 (set_breakpoint_type_at): ... it.
429 (set_breakpoint_at): Call set_breakpoint_type_at.
430 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
431 * mem-break.h (set_breakpoint_at): Update comments.
433 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
435 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
437 (nios2_store_gregset): Likewise.
439 2016-07-01 Pedro Alves <palves@redhat.com>
440 Antoine Tremblay <antoine.tremblay@ericsson.com>
442 * linux-low.c: Change interface to take the target lwp_info
443 pointer directly and return void. Handle detaching from a zombie
445 (linux_detach_lwp_callback): New function.
446 (linux_detach): Detach from the leader thread after detaching from
449 2016-06-28 Yao Qi <yao.qi@linaro.org>
451 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
452 for variable new_offset.
453 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
454 (aarch64_ftrace_insn_reloc_cb): Likewise.
455 (aarch64_ftrace_insn_reloc_tb): Likewise.
456 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
457 PRIx64 instead of PRIx32.
459 2016-06-28 Yao Qi <yao.qi@linaro.org>
461 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
462 (the_low_target): Install arm_get_syscall_trapinfo.
464 2016-06-28 Yao Qi <yao.qi@linaro.org>
466 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
468 (the_low_target): Install aarch64_get_syscall_trapinfo.
470 2016-06-28 Yao Qi <yao.qi@linaro.org>
472 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
474 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
475 Remove parameter sysno.
476 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
479 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
481 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
482 (s390_emit_ne_goto): Likewise.
483 (s390_emit_lt_goto): Likewise.
484 (s390_emit_le_goto): Likewise.
485 (s390_emit_gt_goto): Likewise.
486 (s390_emit_ge_goto): Likewise.
487 (s390x_emit_eq_goto): Likewise.
488 (s390x_emit_ne_goto): Likewise.
489 (s390x_emit_lt_goto): Likewise.
490 (s390x_emit_le_goto): Likewise.
491 (s390x_emit_gt_goto): Likewise.
492 (s390x_emit_ge_goto): Likewise.
493 (s390_emit_ops_impl): Mark variable static.
494 (s390x_emit_ops): Likewise.
496 2016-06-17 Yao Qi <yao.qi@linaro.org>
498 * linux-low.c (handle_extended_wait): Call
499 uninsert_reinsert_breakpoints for the parent process. Remove
500 reinsert breakpoints from the child process. Reinsert them to
501 the parent process when vfork is done.
502 * mem-break.c (uninsert_reinsert_breakpoints): New function.
503 (reinsert_reinsert_breakpoints): New function.
504 * mem-break.h (uninsert_reinsert_breakpoints): Declare
505 (reinsert_reinsert_breakpoints): Declare.
507 2016-06-17 Yao Qi <yao.qi@linaro.org>
509 * linux-low.c (handle_extended_wait): If the parent is doing
510 step-over, remove the reinsert breakpoints from the forked child.
512 2016-06-17 Yao Qi <yao.qi@linaro.org>
514 * linux-low.c (unsuspend_all_lwps): Declare.
515 (linux_low_filter_event): If thread exited, call finish_step_over.
516 If step-over is finished, unsuspend other threads.
518 2016-06-17 Yao Qi <yao.qi@linaro.org>
520 * linux-low.c (linux_resume_one_lwp_throw): Assert
521 has_reinsert_breakpoints returns false.
522 * mem-break.c (delete_disabled_breakpoints): Assert
523 bp type isn't reinsert_breakpoint.
525 2016-06-17 Yao Qi <yao.qi@linaro.org>
527 * linux-low.c (maybe_hw_step): New function.
528 (linux_resume_one_lwp_throw): Call maybe_hw_step.
529 (finish_step_over): Switch current_thread to lwp temporarily,
530 and assert has_reinsert_breakpoints returns true.
531 (proceed_one_lwp): Call maybe_hw_step.
532 * mem-break.c (has_reinsert_breakpoints): New function.
533 * mem-break.h (has_reinsert_breakpoints): Declare.
535 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
537 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
539 2016-05-17 Yao Qi <yao.qi@linaro.org>
541 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
542 instead of find_inferior.
544 2016-05-05 Yao Qi <yao.qi@linaro.org>
546 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
547 Initialize res to zero.
549 2016-05-05 Yao Qi <yao.qi@linaro.org>
551 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
554 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
556 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
557 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
558 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
560 2016-04-28 Par Olsson <par.olsson@windriver.com>
561 Simon Marchi <simon.marchi@ericsson.com>
563 * tracepoint.c (write_inferior_int8): New function.
564 (cmd_qtenable_disable): Write enable flag using
567 2016-04-25 Yao Qi <yao.qi@linaro.org>
569 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
570 (need_step_over_p): Return zero if the LWP has pending signals
571 can be delivered on software single step target.
573 2016-04-25 Yao Qi <yao.qi@linaro.org>
575 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
576 return instead of error.
578 2016-04-22 Yao Qi <yao.qi@linaro.org>
580 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
583 2016-04-22 Yao Qi <yao.qi@linaro.org>
585 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
586 signal when stepping over breakpoint with software single
589 2016-04-21 Pedro Alves <palves@redhat.com>
591 * linux-s390-low.c (s390_collect_ptrace_register)
592 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
594 (s390_check_regset): Use void * instead of gdb_byte *.
596 2016-04-20 Pedro Alves <palves@redhat.com>
598 * configure: Renegerate.
600 2016-04-20 Yao Qi <yao.qi@linaro.org>
602 * linux-aarch32-low.c: Include "arch/arm-linux.h".
603 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
605 (arm_store_gregset): Likewise.
607 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
609 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
610 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
611 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
612 (amd64-avx-mpx-linux.c): New rules.
613 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
614 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
615 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
616 (srv_amd64_regobj): Add amd64-avx-mpx.o.
617 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
618 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
619 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
620 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
621 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
622 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
623 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
624 * linux-x86-low.c (x86_linux_read_description): Add case for
625 X86_XSTATE_AVX_MPX_MASK.
626 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
627 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
628 init_registers_i386_avx_mpx_linux.
629 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
630 (initialize_low_tracepoint): Call
631 init_registers_i386_avx_mpx_linux.
632 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
633 (initialize_low_tracepoint): Call
634 init_registers_amd64_avx_mpx_linux.
635 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
636 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
637 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
640 2016-04-18 Pedro Alves <palves@redhat.com>
642 * configure: Regenerate.
644 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
646 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
647 (aarch64_emit_sub): Likewise.
649 2016-04-12 Pedro Alves <palves@redhat.com>
651 * utils.c (prepare_to_throw_exception): Delete.
653 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
655 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
657 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
659 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
661 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
663 * linux-aarch64-ipa.c: Add <elf.h> include.
664 * linux-ppc-ipa.c: Add <elf.h> include.
665 * linux-s390-ipa.c: Add <elf.h> include.
667 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
669 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
670 (get_raw_reg_ptr): Likewise.
671 (get_trace_state_variable_value_ptr): Likewise.
672 (set_trace_state_variable_value_ptr): Likewise.
673 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
676 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
677 Marcin Kościelnicki <koriakin@0x04.net>
680 * linux-ppc-low.c (emit_insns): New function.
681 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
682 (ppc_emit_prologue): New function.
683 (ppc_emit_epilogue): New function.
684 (ppc_emit_add): New function.
685 (ppc_emit_sub): New function.
686 (ppc_emit_mul): New function.
687 (ppc_emit_lsh): New function.
688 (ppc_emit_rsh_signed): New function.
689 (ppc_emit_rsh_unsigned): New function.
690 (ppc_emit_ext): New function.
691 (ppc_emit_zero_ext): New function.
692 (ppc_emit_log_not): New function.
693 (ppc_emit_bit_and): New function.
694 (ppc_emit_bit_or): New function.
695 (ppc_emit_bit_xor): New function.
696 (ppc_emit_bit_not): New function.
697 (ppc_emit_equal): New function.
698 (ppc_emit_less_signed): New function.
699 (ppc_emit_less_unsigned): New function.
700 (ppc_emit_ref): New function.
701 (ppc_emit_const): New function.
702 (ppc_emit_reg): New function.
703 (ppc_emit_pop): New function.
704 (ppc_emit_stack_flush): New function.
705 (ppc_emit_swap): New function.
706 (ppc_emit_stack_adjust): New function.
707 (ppc_emit_call): New function.
708 (ppc_emit_int_call_1): New function.
709 (ppc_emit_void_call_2): New function.
710 (ppc_emit_if_goto): New function.
711 (ppc_emit_goto): New function.
712 (ppc_emit_eq_goto): New function.
713 (ppc_emit_ne_goto): New function.
714 (ppc_emit_lt_goto): New function.
715 (ppc_emit_le_goto): New function.
716 (ppc_emit_gt_goto): New function.
717 (ppc_emit_ge_goto): New function.
718 (ppc_write_goto_address): New function.
719 (ppc_emit_ops_impl): New static variable.
720 (ppc64v1_emit_prologue): New function.
721 (ppc64v2_emit_prologue): New function.
722 (ppc64_emit_epilogue): New function.
723 (ppc64_emit_add): New function.
724 (ppc64_emit_sub): New function.
725 (ppc64_emit_mul): New function.
726 (ppc64_emit_lsh): New function.
727 (ppc64_emit_rsh_signed): New function.
728 (ppc64_emit_rsh_unsigned): New function.
729 (ppc64_emit_ext): New function.
730 (ppc64_emit_zero_ext): New function.
731 (ppc64_emit_log_not): New function.
732 (ppc64_emit_bit_and): New function.
733 (ppc64_emit_bit_or): New function.
734 (ppc64_emit_bit_xor): New function.
735 (ppc64_emit_bit_not): New function.
736 (ppc64_emit_equal): New function.
737 (ppc64_emit_less_signed): New function.
738 (ppc64_emit_less_unsigned): New function.
739 (ppc64_emit_ref): New function.
740 (ppc64_emit_const): New function.
741 (ppc64v1_emit_reg): New function.
742 (ppc64v2_emit_reg): New function.
743 (ppc64_emit_pop): New function.
744 (ppc64_emit_stack_flush): New function.
745 (ppc64_emit_swap): New function.
746 (ppc64v1_emit_call): New function.
747 (ppc64v2_emit_call): New function.
748 (ppc64v1_emit_int_call_1): New function.
749 (ppc64v2_emit_int_call_1): New function.
750 (ppc64v1_emit_void_call_2): New function.
751 (ppc64v2_emit_void_call_2): New function.
752 (ppc64_emit_if_goto): New function.
753 (ppc64_emit_eq_goto): New function.
754 (ppc64_emit_ne_goto): New function.
755 (ppc64_emit_lt_goto): New function.
756 (ppc64_emit_le_goto): New function.
757 (ppc64_emit_gt_goto): New function.
758 (ppc64_emit_ge_goto): New function.
759 (ppc64v1_emit_ops_impl): New static variable.
760 (ppc64v2_emit_ops_impl): New static variable.
761 (ppc_emit_ops): New function.
762 (linux_low_target): Wire in ppc_emit_ops.
764 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
765 Marcin Kościelnicki <koriakin@0x04.net>
768 * Makefile.in: Add powerpc-*-ipa.o
769 * configure.srv: Add ipa_obj for powerpc*-linux.
770 * linux-ppc-ipa.c: New file.
771 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
773 (PPC_FIELD): New macro.
774 (PPC_SEXT): New macro.
775 (PPC_OP6): New macro.
779 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
780 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
781 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
782 (ppc_get_thread_area): New function.
783 (is_elfv2_inferior): New function.
784 (gen_ds_form): New function.
785 (GEN_STD): New macro.
786 (GEN_STDU): New macro.
788 (GEN_LDU): New macro.
789 (gen_d_form): New function.
790 (GEN_ADDI): New macro.
791 (GEN_ADDIS): New macro.
793 (GEN_LIS): New macro.
794 (GEN_ORI): New macro.
795 (GEN_ORIS): New macro.
796 (GEN_LWZ): New macro.
797 (GEN_STW): New macro.
798 (GEN_STWU): New macro.
799 (gen_xfx_form): New function.
800 (GEN_MFSPR): New macro.
801 (GEN_MTSPR): New macro.
802 (GEN_MFCR): New macro.
803 (GEN_MTCR): New macro.
804 (GEN_SYNC): New macro.
805 (GEN_LWSYNC): New macro.
806 (gen_x_form): New function.
809 (GEN_LWARX): New macro.
810 (GEN_STWCX): New macro.
811 (GEN_CMPW): New macro.
812 (gen_md_form): New function.
813 (GEN_RLDICL): New macro.
814 (GEN_RLDICR): New macro.
815 (gen_i_form): New function.
818 (gen_b_form): New function.
819 (GEN_BNE): New macro.
820 (GEN_LOAD): New macro.
821 (GEN_STORE): New macro.
822 (gen_limm): New function.
823 (gen_atomic_xchg): New function.
824 (gen_call): New function.
825 (ppc_relocate_instruction): New function.
826 (ppc_install_fast_tracepoint_jump_pad): New function.
827 (ppc_get_min_fast_tracepoint_insn_len): New function.
828 (ppc_get_ipa_tdesc_idx): New function.
829 (the_low_target): Wire in the new functions.
830 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
832 * linux-ppc-tdesc.h: New file.
834 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
836 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
837 (alloc_jump_pad_buffer): New function.
838 * linux-amd64-ipa.c: Add <sys/mman.h> include.
839 (alloc_jump_pad_buffer): New function.
840 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
841 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
842 (alloc_jump_pad_buffer): New function.
843 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
844 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
845 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
846 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
848 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
850 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
851 * linux-amd64-ipa.c: Likewise.
852 * linux-i386-ipa.c: Likewise.
853 * linux-s390-ipa.c: Likewise.
854 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
855 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
856 set_trace_state_variable_value_ptr.
857 (struct ipa_sym_addresses): Likewise.
858 (symbol_list): Likewise.
859 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
860 accessing gdb_collect directly.
861 (gdb_collect_ptr_type): New typedef.
862 (get_raw_reg_ptr_type): New typedef.
863 (get_trace_state_variable_value_ptr_type): New typedef.
864 (set_trace_state_variable_value_ptr_type): New typedef.
865 (gdb_collect_ptr): New global.
866 (get_raw_reg_ptr): New global.
867 (get_trace_state_variable_value_ptr): New global.
868 (set_trace_state_variable_value_ptr): New global.
869 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
870 accessing get_raw_reg directly.
871 (get_get_tsv_func_addr): Likewise for
872 get_trace_state_variable_value_ptr.
873 (get_set_tsv_func_addr): Likewise for
874 set_trace_state_variable_value_ptr.
875 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
877 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
879 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
881 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
883 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
885 (relocate_instruction): Remove own_buf.
886 * server.c (own_buf): Make global.
887 (handle_v_requests): Make global.
888 * server.h (own_buf): New declaration.
889 (handle_v_requests): New prototype.
891 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
894 * linux-s390-low.c (add_insns): New function.
895 (s390_emit_prologue): New function.
896 (s390_emit_epilogue): New function.
897 (s390_emit_add): New function.
898 (s390_emit_sub): New function.
899 (s390_emit_mul): New function.
900 (s390_emit_lsh): New function.
901 (s390_emit_rsh_signed): New function.
902 (s390_emit_rsh_unsigned): New function.
903 (s390_emit_ext): New function.
904 (s390_emit_log_not): New function.
905 (s390_emit_bit_and): New function.
906 (s390_emit_bit_or): New function.
907 (s390_emit_bit_xor): New function.
908 (s390_emit_bit_not): New function.
909 (s390_emit_equal): New function.
910 (s390_emit_less_signed): New function.
911 (s390_emit_less_unsigned): New function.
912 (s390_emit_ref): New function.
913 (s390_emit_if_goto): New function.
914 (s390_emit_goto): New function.
915 (s390_write_goto_address): New function.
916 (s390_emit_litpool): New function.
917 (s390_emit_const): New function.
918 (s390_emit_call): New function.
919 (s390_emit_reg): New function.
920 (s390_emit_pop): New function.
921 (s390_emit_stack_flush): New function.
922 (s390_emit_zero_ext): New function.
923 (s390_emit_swap): New function.
924 (s390_emit_stack_adjust): New function.
925 (s390_emit_set_r2): New function.
926 (s390_emit_int_call_1): New function.
927 (s390_emit_void_call_2): New function.
928 (s390_emit_eq_goto): New function.
929 (s390_emit_ne_goto): New function.
930 (s390_emit_lt_goto): New function.
931 (s390_emit_le_goto): New function.
932 (s390_emit_gt_goto): New function.
933 (s390_emit_ge_goto): New function.
934 (s390x_emit_prologue): New function.
935 (s390x_emit_epilogue): New function.
936 (s390x_emit_add): New function.
937 (s390x_emit_sub): New function.
938 (s390x_emit_mul): New function.
939 (s390x_emit_lsh): New function.
940 (s390x_emit_rsh_signed): New function.
941 (s390x_emit_rsh_unsigned): New function.
942 (s390x_emit_ext): New function.
943 (s390x_emit_log_not): New function.
944 (s390x_emit_bit_and): New function.
945 (s390x_emit_bit_or): New function.
946 (s390x_emit_bit_xor): New function.
947 (s390x_emit_bit_not): New function.
948 (s390x_emit_equal): New function.
949 (s390x_emit_less_signed): New function.
950 (s390x_emit_less_unsigned): New function.
951 (s390x_emit_ref): New function.
952 (s390x_emit_if_goto): New function.
953 (s390x_emit_const): New function.
954 (s390x_emit_call): New function.
955 (s390x_emit_reg): New function.
956 (s390x_emit_pop): New function.
957 (s390x_emit_stack_flush): New function.
958 (s390x_emit_zero_ext): New function.
959 (s390x_emit_swap): New function.
960 (s390x_emit_stack_adjust): New function.
961 (s390x_emit_int_call_1): New function.
962 (s390x_emit_void_call_2): New function.
963 (s390x_emit_eq_goto): New function.
964 (s390x_emit_ne_goto): New function.
965 (s390x_emit_lt_goto): New function.
966 (s390x_emit_le_goto): New function.
967 (s390x_emit_gt_goto): New function.
968 (s390x_emit_ge_goto): New function.
969 (s390_emit_ops): New function.
970 (struct linux_target_ops): Fill in emit_ops hook.
972 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
975 * Makefile.in: Add s390 IPA files.
976 * configure.srv: Build IPA for s390.
977 * linux-s390-ipa.c: New file.
978 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
979 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
980 (tdesc_s390_linux32): Likewise.
981 (init_registers_s390_linux32v1): Likewise.
982 (tdesc_s390_linux32v1): Likewise.
983 (init_registers_s390_linux32v2): Likewise.
984 (tdesc_s390_linux32v2): Likewise.
985 (init_registers_s390_linux64): Likewise.
986 (tdesc_s390_linux64): Likewise.
987 (init_registers_s390_linux64v1): Likewise.
988 (tdesc_s390_linux64v1): Likewise.
989 (init_registers_s390_linux64v2): Likewise.
990 (tdesc_s390_linux64v2): Likewise.
991 (init_registers_s390_te_linux64): Likewise.
992 (tdesc_s390_te_linux64): Likewise.
993 (init_registers_s390_vx_linux64): Likewise.
994 (tdesc_s390_vx_linux64): Likewise.
995 (init_registers_s390_tevx_linux64): Likewise.
996 (tdesc_s390_tevx_linux64): Likewise.
997 (init_registers_s390x_linux64): Likewise.
998 (tdesc_s390x_linux64): Likewise.
999 (init_registers_s390x_linux64v1): Likewise.
1000 (tdesc_s390x_linux64v1): Likewise.
1001 (init_registers_s390x_linux64v2): Likewise.
1002 (tdesc_s390x_linux64v2): Likewise.
1003 (init_registers_s390x_te_linux64): Likewise.
1004 (tdesc_s390x_te_linux64): Likewise.
1005 (init_registers_s390x_vx_linux64): Likewise.
1006 (tdesc_s390x_vx_linux64): Likewise.
1007 (init_registers_s390x_tevx_linux64): Likewise.
1008 (tdesc_s390x_tevx_linux64): Likewise.
1009 (have_hwcap_s390_vx): New static variable.
1010 (s390_arch_setup): Fill have_hwcap_s390_vx.
1011 (s390_get_thread_area): New function.
1012 (s390_ft_entry_gpr_esa): New const.
1013 (s390_ft_entry_gpr_zarch): New const.
1014 (s390_ft_entry_misc): New const.
1015 (s390_ft_entry_fr): New const.
1016 (s390_ft_entry_vr): New const.
1017 (s390_ft_main_31): New const.
1018 (s390_ft_main_64): New const.
1019 (s390_ft_exit_fr): New const.
1020 (s390_ft_exit_vr): New const.
1021 (s390_ft_exit_misc): New const.
1022 (s390_ft_exit_gpr_esa): New const.
1023 (s390_ft_exit_gpr_zarch): New const.
1024 (append_insns): New function.
1025 (s390_relocate_instruction): New function.
1026 (s390_install_fast_tracepoint_jump_pad): New function.
1027 (s390_get_min_fast_tracepoint_insn_len): New function.
1028 (s390_get_ipa_tdesc_idx): New function.
1029 (struct linux_target_ops): Wire in the above functions.
1030 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1031 * linux-s390-tdesc.h: New file.
1033 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1035 * linux-s390-low.c (s390_supports_tracepoints): New function.
1036 (struct linux_target_ops): Fill supports_tracepoints hook.
1038 2016-03-18 Yao Qi <yao.qi@linaro.org>
1040 * linux-low.c (lwp_signal_can_be_delivered): New function.
1041 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1043 2016-03-18 Yao Qi <yao.qi@linaro.org>
1045 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1046 0 if signal is enqueued. Remove 'signal' from one debugging
1047 message. Move one debugging message to some lines below.
1048 Remove code setting 'signal' to 0.
1050 2016-03-18 Yao Qi <yao.qi@linaro.org>
1052 * linux-low.c (linux_low_filter_event): Remove redundant
1053 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1055 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1057 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1058 (struct linux_target_ops): Wire in the above.
1060 2016-03-03 Yao Qi <yao.qi@linaro.org>
1062 * linux-low.c: Update comments to start_step_over.
1064 2016-03-03 Yao Qi <yao.qi@linaro.org>
1067 * linux-low.c (handle_extended_wait): Set child suspended
1068 if event_lwp->bp_reinsert isn't zero.
1070 2016-03-02 Yao Qi <yao.qi@linaro.org>
1072 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1073 enqueue_pending_signal.
1075 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1077 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1080 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1082 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1083 (s390_regmap_3264) [!__s390x__]: New global.
1084 (s390_collect_ptrace_register): Skip map entries containing -1.
1085 (s390_supply_ptrace_register): Ditto.
1086 (s390_fill_gprs_high): New function.
1087 (s390_store_gprs_high): New function.
1088 (s390_regsets): Add NT_S390_HIGH_GPRS.
1089 (s390_get_hwcap): Enable on 31-bit.
1090 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1091 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1092 Detect NT_S390_HIGH_GPRS.
1093 (s390_usrregs_info_3264): Enable on 31-bit.
1094 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1095 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1097 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1100 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1101 * configure.srv: Ditto.
1102 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1103 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1104 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1105 (init_registers_amd64_linux): Remove prototype.
1106 (tdesc_amd64_linux): Remove declaration.
1107 (get_ipa_tdesc): New function.
1108 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1109 initialize remaining tdescs.
1110 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1111 (init_registers_i386_linux): Remove prototype.
1112 (tdesc_i386_linux): Remove declaration.
1113 (get_ipa_tdesc): New function.
1114 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1115 initialize remaining tdescs.
1116 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1117 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1118 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1119 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1120 (x86_get_ipa_tdesc_idx): New function.
1121 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1122 * linux-x86-tdesc.h: New file.
1123 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1124 (target_get_ipa_tdesc_idx): New macro.
1125 * tracepoint.c (ipa_tdesc_idx): New macro.
1126 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1127 (symbol_list): Add ipa_tdesc_idx.
1128 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1129 (ipa_tdesc): Remove.
1130 (ipa_tdesc_idx): New variable.
1131 (get_context_regcache): Use get_ipa_tdesc.
1132 (gdb_collect): Ditto.
1134 * tracepoint.h (get_ipa_tdesc): New prototype.
1135 (ipa_tdesc): Remove.
1137 2016-02-24 Pedro Alves <palves@redhat.com>
1139 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1140 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1141 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1142 Factor out common code between the USE_SIGTRAP_SIGINFO and
1143 !USE_SIGTRAP_SIGINFO blocks.
1144 (linux_low_filter_event): Call save_stop_reason instead of
1145 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1147 (linux_wait_1): Update comments.
1149 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1151 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1152 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1153 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1154 ppc_insert_point, ppc_remove_point.
1156 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1158 * linux-s390-low.c (s390_supports_z_point_type): New function.
1159 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1161 2016-02-16 Yao Qi <yao.qi@linaro.org>
1163 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1164 PC. Get pc from regcache_read_pc.
1166 2016-02-12 Yao Qi <yao.qi@linaro.org>
1168 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1169 or linux_get_pc_32bit.
1170 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1172 2016-02-12 Yao Qi <yao.qi@linaro.org>
1174 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1175 arm_linux_get_next_pcs_fixup.
1177 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1179 * tracepoint.c (x_tracepoint_action_download): Change
1180 write_inferior_data_ptr to write_inferior_data_pointer.
1181 (cmd_qtstart): Likewise.
1182 (write_inferior_data_ptr): Remove.
1183 (download_agent_expr): Change write_inferior_data_ptr to
1184 write_inferior_data_pointer.
1185 (download_tracepoint_1): Likewise.
1186 (download_tracepoint): Likewise.
1187 (download_trace_state_variables): Likewise.
1189 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1190 Marcin Kościelnicki <koriakin@0x04.net>
1192 * tracepoint.c (struct tracepoint_action_ops): Remove.
1193 (struct tracepoint_action): Remove ops.
1194 (m_tracepoint_action_download, r_tracepoint_action_download)
1195 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1196 size and offset accordingly.
1197 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1198 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1199 (tracepoint_action_send, tracepoint_action_download): New functions.
1200 Helpers for trace action handlers.
1201 (add_tracepoint_action): Remove setup actions ops.
1202 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1204 2016-02-10 Yao Qi <yao.qi@linaro.org>
1206 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1208 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1210 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1212 * configure: Regenerate.
1214 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1216 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1217 void * to gdb_byte *.
1218 * linux-low.c (siginfo_fixup): Likewise.
1219 (linux_xfer_siginfo): Likewise.
1220 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1222 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1224 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1226 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1228 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1230 * linux-x86-low.c [__x86_64__]: Include
1231 "nat/amd64-linux-siginfo.h".
1232 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1233 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1234 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1235 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1236 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1237 (cpt_si_fd, si_timerid, si_overrun): Move from
1238 nat/amd64-linux-siginfo.c.
1239 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1241 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1243 * server.c (skip_to_semicolon): Remove.
1244 (process_point_options): Use strchrnul instead of
1247 2016-01-26 Yao Qi <yao.qi@linaro.org>
1249 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1250 * linux-low.c (install_software_single_step_breakpoints): Don't
1251 call regcache_read_pc.
1252 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1255 2016-01-26 Yao Qi <yao.qi@linaro.org>
1257 * linux-low.c (install_software_single_step_breakpoints): Call
1258 regcache_read_pc instead of get_pc.
1260 2016-01-26 Yao Qi <yao.qi@linaro.org>
1262 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1263 (unblock_async_io): Rename to ...
1264 (block_unblock_async_io): ... it. New function.
1265 (enable_async_io): Don't install SIGIO handler. Unblock it
1267 (disable_async_io): Don't ignore SIGIO. Block it instead.
1268 (initialize_async_io): Install SIGIO handler. Don't call
1271 2016-01-26 Yao Qi <yao.qi@linaro.org>
1273 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1274 first character is '\003', call *the_target->request_interrupt.
1276 2016-01-25 Yao Qi <yao.qi@linaro.org>
1278 * remote-utils.c (new_thread_notify): Remove.
1279 (dead_thread_notify): Likewise.
1280 * remote-utils.h (new_thread_notify): Remove declaration.
1281 (dead_thread_notify): Likewise.
1283 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1285 * gdb.trace/pending.exp: Fix expected message on continue.
1287 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1289 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1290 it works properly on big-endian machines where sizeof (CORE_ADDR)
1293 2016-01-21 Pedro Alves <palves@redhat.com>
1295 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1296 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1297 * configure: Regenerate.
1299 2016-01-21 Yao Qi <yao.qi@linaro.org>
1301 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1302 is_thumb and set it according to CPSR saved on the stack.
1303 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1304 arm_sigreturn_next_pc.
1306 2016-01-18 Yao Qi <yao.qi@linaro.org>
1308 * linux-low.c (linux_set_pc_64bit): New function.
1309 (linux_get_pc_64bit): New function.
1310 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1312 * linux-sparc-low.c (debug_threads): Remove declaration.
1313 (sparc_get_pc): Remove.
1314 (the_low_target): Use linux_get_pc_64bit instead of
1316 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1317 (the_low_target): Use linux_get_pc_64bit and
1320 2016-01-18 Yao Qi <yao.qi@linaro.org>
1322 * linux-arm-low.c (debug_threads): Remove declaration.
1323 (arm_get_pc, arm_set_pc): Remove.
1324 (the_low_target): Use linux_get_pc_32bit and
1326 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1327 (the_low_target): Use linux_get_pc_32bit and
1329 * linux-cris-low.c (debug_threads): Remove declaration.
1330 (cris_get_pc, cris_set_pc,): Remove.
1331 (the_low_target): Use linux_get_pc_32bit and
1333 * linux-crisv32-low.c (debug_threads): Remove declaration.
1334 (cris_get_pc, cris_set_pc): Remove.
1335 (the_low_target): Use linux_get_pc_32bit and
1337 * linux-low.c: Include inttypes.h.
1338 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1339 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1340 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1341 (the_low_target): Use linux_get_pc_32bit and
1343 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1344 (the_low_target): Use linux_get_pc_32bit and
1346 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1347 (the_low_target): Use linux_get_pc_32bit and
1349 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1350 (the_low_target): Use linux_get_pc_32bit and
1352 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1353 (the_low_target): Use linux_get_pc_32bit and
1356 2016-01-18 Gary Benson <gbenson@redhat.com>
1358 * configure.ac (AC_FUNC_FORK): New check.
1359 * config.in: Regenerate.
1360 * configure: Likewise.
1362 2016-01-14 Yao Qi <yao.qi@linaro.org>
1364 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1365 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1366 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1367 arm_get_next_pcs_ctor.
1369 2016-01-12 Josh Stone <jistone@redhat.com>
1370 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1372 * inferiors.h: Include "gdb_vecs.h".
1373 (struct process_info): Add syscalls_to_catch.
1374 * inferiors.c (remove_process): Free syscalls_to_catch.
1375 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1376 syscall_return stops.
1377 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1378 * server.c (handle_general_set): Handle QCatchSyscalls.
1379 (handle_query): Report support for QCatchSyscalls.
1380 * target.h (struct target_ops): Add supports_catch_syscall.
1381 (target_supports_catch_syscall): New macro.
1382 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1383 (struct lwp_info): Add syscall_state.
1384 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1385 Maintain syscall_state and syscalls_to_catch across exec.
1386 (get_syscall_trapinfo): New function, proxy to the_low_target.
1387 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1388 (linux_low_filter_event): Toggle syscall_state entry/return for
1389 syscall traps, and set it ignored for all others.
1390 (gdb_catching_syscalls_p): New function.
1391 (gdb_catch_this_syscall_p): New function.
1392 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1393 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1394 (linux_supports_catch_syscall): New function.
1395 (linux_target_ops): Install it.
1396 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1397 (the_low_target): Install it.
1399 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1401 * acinclude.m4: Include new ../warning.m4 file.
1402 * configure: Regenerated.
1403 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1405 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1407 * ax.c (is_goto_target): Mark static.
1408 * linux-low.c (register_addr): Likewise.
1409 (linux_fetch_registers, linux_store_registers): Likewise.
1410 * mem-break.c (any_persistent_commands): Fix old prototype.
1411 (add_commands_to_breakpoint): Mark static.
1412 * regcache.c (find_register_by_name): Delete unused func.
1413 * remote-utils.c (hex_or_minus_one): Mark static.
1414 * server.c (monitor_show_help): Mark static.
1415 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1416 handle_v_requests): Likewise.
1418 2016-01-12 Pedro Alves <palves@redhat.com>
1420 Remove use of the registered trademark symbol throughout.
1422 2016-01-08 Yao Qi <yao.qi@linaro.org>
1424 * remote-utils.c (getpkt): If c is '\003', call target hook
1427 2016-01-06 Yao Qi <yao.qi@linaro.org>
1429 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1430 linux-aarch32-low.c.
1431 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1432 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1433 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1434 (thumb2_breakpoint): Declare.
1435 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1436 linux-aarch32-low.h.
1437 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1438 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1439 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1441 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1443 * gdbreplay.c (gdbreplay_version): Change copyright year in
1445 * server.c (gdbserver_version): Likewise.
1447 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1449 * server.c (crc32_table): Delete.
1450 (crc32): Use libiberty's xcrc32 function.
1452 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1454 * lynx-low.c (lynx_delete_thread_callback): New function.
1455 (lynx_mourn): Properly delete our process and all of its
1456 threads. Remove call to clear_inferiors.
1458 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1460 * target.c (thread_search_callback): Add check that
1461 the thread_stopped target callback is not NULL before
1464 2015-12-21 Yao Qi <yao.qi@linaro.org>
1466 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1469 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1471 * server.c (handle_query): Call target_supports_software_single_step.
1473 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1475 * linux-low.c (single_step): New function.
1476 (linux_resume_one_lwp_throw): Call single_step.
1477 (start_step_over): Likewise.
1479 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1481 * Makefile.in (SFILES): Append arch/arm-linux.c,
1482 arch/arm-get-next-pcs.c.
1483 (arm-linux.o): New rule.
1484 (arm-get-next-pcs.o): New rule.
1485 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1487 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1488 to linux-aarch32-low.c.
1489 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1490 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1491 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1492 (thumb2_breakpoint_len): Likewise.
1493 (arm_is_thumb_mode): Make non-static.
1494 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1495 from linux-aarch32-low.c.
1496 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1497 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1498 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1499 (thumb2_breakpoint_len): Likewise.
1500 (arm_is_thumb_mode): New declaration.
1501 * linux-arm-low.c: Include arch/arm-linux.h
1502 aarch/arm-get-next-pcs.h, sys/syscall.h.
1503 (get_next_pcs_ops): New struct.
1504 (get_next_pcs_addr_bits_remove): New function.
1505 (get_next_pcs_is_thumb): New function.
1506 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1507 (arm_sigreturn_next_pc): Likewise.
1508 (get_next_pcs_syscall_next_pc): Likewise.
1509 (arm_gdbserver_get_next_pcs): Likewise.
1510 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1512 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1513 * server.h: Include gdb_vecs.h.
1515 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1517 * Makefile.in (SFILES): Append common/common-regcache.c.
1518 (OBS): Append common-regcache.o.
1519 (common-regcache.o): New rule.
1520 * regcache.c (init_register_cache): Initialize cache to
1522 (regcache_raw_read_unsigned): New function.
1523 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1524 register_status enum.
1526 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1528 * linux-aarch64-low.c (the_low_targets): Rename
1529 breakpoint_reinsert_addr to get_next_pcs.
1530 * linux-arm-low.c (the_low_targets): Likewise.
1531 * linux-bfin-low.c (the_low_targets): Likewise.
1532 * linux-cris-low.c (the_low_targets): Likewise.
1533 * linux-crisv32-low.c (the_low_targets): Likewise.
1534 * linux-low.c (can_software_single_step): Likewise.
1535 (install_software_single_step_breakpoints): New function.
1536 (start_step_over): Use install_software_single_step_breakpoints.
1537 * linux-low.h: New CORE_ADDR vector.
1538 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1540 * linux-mips-low.c (the_low_targets): Likewise.
1541 * linux-nios2-low.c (the_low_targets): Likewise.
1542 * linux-sparc-low.c (the_low_targets): Likewise.
1544 2015-12-17 Pedro Alves <palves@redhat.com>
1546 * linux-low.c (linux_kill_one_lwp): Remove references to
1548 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1550 (linux_init_signals): Delete.
1551 (initialize_low): Adjust.
1552 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1554 2015-12-16 Pedro Alves <palves@redhat.com>
1556 * configure.ac (compiler warning flags): When testing a
1557 -Wno-foo option, check whether -Wfoo works instead.
1558 * configure: Regenerate.
1560 2015-12-11 Don Breazeal <donb@codesourcery.com>
1562 * server.c (process_serial_event): Don't exit from gdbserver
1563 in remote mode if there are still active inferiors.
1565 2015-12-11 Yao Qi <yao.qi@linaro.org>
1567 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1568 arm_breakpoint_at if the process is 32-bit.
1570 2015-12-11 Yao Qi <yao.qi@linaro.org>
1572 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1575 2015-12-07 Yao Qi <yao.qi@linaro.org>
1577 * configure.srv: Append arm.o to srv_tgtobj for
1578 aarch64*-*-linux* target.
1579 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1580 from linux-arm-low.c.
1581 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1582 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1583 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1584 (thumb2_breakpoint_len): Likewise.
1585 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1586 (arm_breakpoint_kinds): Likewise.
1587 (arm_breakpoint_kind_from_pc): Likewise.
1588 (arm_sw_breakpoint_from_kind): Likewise.
1589 (arm_breakpoint_kind_from_current_state): Likewise.
1590 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1591 (arm_sw_breakpoint_from_kind): Declare.
1592 (arm_breakpoint_kind_from_current_state): Declare.
1593 (arm_breakpoint_at): Declare.
1594 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1595 arm_sw_breakpoint_from_kind if process is 32-bit.
1596 (aarch64_breakpoint_kind_from_pc): New function.
1597 (aarch64_breakpoint_kind_from_current_state): New function.
1598 (the_low_target): Initialize fields breakpoint_kind_from_pc
1599 and breakpoint_kind_from_current_state.
1600 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1601 linux-aarch32-low.c.
1602 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1603 (arm_breakpoint, arm_breakpoint_len): Likewise.
1604 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1605 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1606 (arm_is_thumb_mode): Likewise.
1607 (arm_breakpoint_at): Likewise.
1608 (arm_breakpoint_kind_from_pc): Likewise.
1609 (arm_sw_breakpoint_from_kind): Likewise.
1610 (arm_breakpoint_kind_from_current_state): Likewise.
1613 2015-08-04 Yao Qi <yao.qi@linaro.org>
1615 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1616 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1617 * server.c (extended_protocol): Remove "static".
1618 * server.h (extended_protocol): Declare it.
1620 2015-12-04 Josh Stone <jistone@redhat.com>
1622 * target.h (struct target_ops) <arch_setup>: Rename to ...
1623 (struct target_ops) <post_create_inferior>: ... this.
1624 (target_arch_setup): Rename to ...
1625 (target_post_create_inferior): ... this, calling post_create_inferior.
1626 * server.c (start_inferior): Update target_arch_setup calls to
1627 target_post_create_inferior.
1628 * linux-low.c (linux_low_ptrace_options): Forward declare.
1629 (linux_arch_setup): Update its comment for general use.
1630 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1631 (struct linux_target_ops): Use linux_post_create_inferior.
1632 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1633 to post_create_inferior.
1634 * nto-low.c (struct nto_target_ops): Likewise.
1635 * spu-low.c (struct spu_target_ops): Likewise.
1636 * win32-low.c (struct win32_target_ops): Likewise.
1638 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1640 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1642 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1644 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1645 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1646 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1647 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1648 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1649 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1650 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1651 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1652 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1653 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1654 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1655 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1657 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1659 * linux-low.c (linux_look_up_symbols): Don't call
1660 linux_supports_traceclone.
1661 * linux-low.h (thread_db_init): Remove use_events argument.
1662 * thread-db.c (thread_db_use_event): Remove global variable.
1663 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1664 (struct thread_db) <td_create_bp>: Remove field.
1665 (thread_db_create_event): Remove function.
1666 (thread_db_enable_reporting): Likewise.
1667 (find_one_thread): Don't check for thread_db_use_events.
1668 (attach_thread): Likewise.
1669 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1670 (try_thread_db_load_1): Don't check for thread_db_use_events.
1671 (thread_db_init): Remove use_events argument and thread events
1673 (remove_thread_event_breakpoints): Remove function.
1674 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1676 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1678 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1680 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1681 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1682 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1683 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1684 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1686 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1688 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1689 * linux-low.c (can_hardware_single_step): Use
1690 supports_hardware_single_step.
1691 (can_software_single_step): New function.
1692 (start_step_over): Call can_software_single_step.
1693 (linux_supports_hardware_single_step): New function.
1694 (struct target_ops) <supports_software_single_step>: Initialize.
1695 * linux-low.h (struct linux_target_ops)
1696 <supports_hardware_single_step>: Initialize.
1697 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1698 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1699 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1700 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1701 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1702 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1703 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1704 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1705 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1706 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1708 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1709 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1711 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1712 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1713 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1715 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1716 * target.h (struct target_ops): <supports_software_single_step>:
1718 (target_supports_software_single_step): New macro.
1720 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1722 * linux-low.c (linux_wait_1): Fix pc advance condition.
1723 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1724 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1726 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1728 * linux-arm-low.c (arm_is_thumb_mode): New function.
1729 (arm_breakpoint_at): Use arm_is_thumb_mode.
1730 (arm_breakpoint_kind_from_current_state): New function.
1731 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1733 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1734 (linux_breakpoint_kind_from_current_state): New function.
1735 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1736 * linux-low.h (struct linux_target_ops)
1737 <breakpoint_kind_from_current_state>: New field.
1738 * target.h (struct target_ops): Likewise.
1739 (target_breakpoint_kind_from_current_state): New macro.
1741 2015-11-30 Pedro Alves <palves@redhat.com>
1743 * linux-low.c (linux_resume): Wake up the event loop before
1746 2015-11-30 Pedro Alves <palves@redhat.com>
1748 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1750 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1752 * target.c (struct thread_search): New structure.
1753 (thread_search_callback): New function.
1754 (prev_general_thread): New global.
1755 (prepare_to_access_memory, done_accessing_memory): New functions.
1756 * target.h (prepare_to_access_memory, done_accessing_memory):
1757 Replace macros with function declarations.
1759 2015-11-30 Pedro Alves <palves@redhat.com>
1762 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1763 report TARGET_WAITKIND_NO_RESUMED.
1764 * remote-utils.c (prepare_resume_reply): Handle
1765 TARGET_WAITKIND_NO_RESUMED.
1766 * server.c (report_no_resumed): New global.
1767 (handle_query) <qSupported>: Handle "no-resumed+". Report
1768 "no-resumed+" support.
1769 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1770 return error if the client doesn't support no-resumed events.
1771 (push_stop_notification): New function.
1772 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1773 events if the client supports them.
1775 2015-11-30 Pedro Alves <palves@redhat.com>
1777 * linux-low.c (thread_still_has_status_pending_p): Don't check
1779 (lwp_resumed): New function.
1780 (status_pending_p_callback): Return early if the LWP is not
1781 supposed to be resumed.
1783 2015-11-30 Pedro Alves <palves@redhat.com>
1785 * linux-low.c (handle_extended_wait): Assert that the LWP's
1786 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1787 thread create events, leave the new child's status pending.
1788 (linux_low_filter_event): If GDB wants to hear about thread exit
1789 events, leave the LWP marked dead and don't delete it.
1790 (linux_wait_for_event_filtered): Don't check for thread exit.
1791 (filter_exit_event): New function.
1792 (linux_wait_1): Use it, when returning an exit event.
1793 (linux_resume_one_lwp_throw): Assert that the LWP's
1794 waitstatus is TARGET_WAITKIND_IGNORE.
1795 * remote-utils.c (prepare_resume_reply): Handle
1796 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1797 * server.c (report_thread_events): New global.
1798 (handle_general_set): Handle QThreadEvents.
1799 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1800 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1801 TARGET_WAITKIND_THREAD_EXITED.
1802 * server.h (report_thread_events): Declare.
1804 2015-11-30 Pedro Alves <palves@redhat.com>
1806 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1807 the thread's last_resume_kind was resume_stop.
1809 2015-11-30 Pedro Alves <palves@redhat.com>
1811 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1814 2015-11-30 Pedro Alves <palves@redhat.com>
1816 * server.c (handle_v_requests): Handle vCtrlC.
1818 2015-11-30 Pedro Alves <palves@redhat.com>
1820 * gdbthread.h (find_any_thread_of_pid): Declare.
1821 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1823 * server.c (handle_query): If current_thread is NULL, look for
1824 another thread of the selected process.
1826 2015-11-26 Daniel Colascione <dancol@dancol.org>
1827 Simon Marchi <simon.marchi@ericsson.com>
1829 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1830 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1832 * target.h (struct target_ops) <thread_name>: New field.
1833 (target_thread_name): New macro.
1835 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1837 * regcache.h (regcache_invalidate_pid): Add declaration.
1838 * regcache.c (regcache_invalidate_pid): New function, extracted
1839 from regcache_invalidate.
1840 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1841 Add trivial documentation comment.
1842 * lynx-low.c: Use regcache_invalidate_pid instead of
1843 regcache_invalidate.
1845 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1847 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1848 and Elf64_auxv_t if the target is Android.
1850 2015-11-22 Doug Evans <xdje42@gmail.com>
1852 * target.h: #include <sys/types.h>.
1854 2015-11-19 Pedro Alves <palves@redhat.com>
1856 * linux-low.c (linux_process_qsupported): Change prototype.
1858 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1860 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1861 and adjust to loop over all features.
1862 * server.c (handle_query) <qSupported>: Adjust to call
1863 target_process_qsupported once, passing it a vector of unprocessed
1865 * target.h (struct target_ops) <process_qsupported>: Change
1867 (target_process_qsupported): Adjust.
1869 2015-11-19 Pedro Alves <palves@redhat.com>
1871 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1873 * configure: Regenerate.
1875 2015-11-19 Pedro Alves <palves@redhat.com>
1877 * configure: Regenerate.
1879 2015-11-19 Yao Qi <yao.qi@linaro.org>
1881 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1884 2015-11-19 Yao Qi <yao.qi@linaro.org>
1886 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1887 (struct aarch64_operand): Move enum out.
1889 2015-11-19 Yao Qi <yao.qi@linaro.org>
1891 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1892 struct user_fpsimd_state *.
1893 (aarch64_store_fpregset): Likewise.
1895 2015-11-19 Yao Qi <yao.qi@linaro.org>
1897 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1898 struct user_pt_regs *.
1899 (aarch64_store_gregset): Likewise.
1901 2015-11-18 Pedro Alves <palves@redhat.com>
1903 * Makefile.in (all_object_files): Add $IPA_OBJS.
1905 2015-11-17 Pedro Alves <palves@redhat.com>
1907 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1908 GDB_SIGNAL_0 and gdb_signal_to_string.
1910 2015-11-17 Pedro Alves <palves@redhat.com>
1912 * win32-low.c (handle_output_debug_string): Remove parameter.
1913 (win32_kill): Remove our_status local and adjust call to
1914 handle_output_debug_string.
1915 (get_child_debug_event): Adjust call to
1916 handle_output_debug_string.
1918 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1920 * linux-mips-low.c (mips_fill_gregset): Add cast.
1921 (mips_store_gregset): Likewise.
1922 (mips_fill_fpregset): Likewise.
1923 (mips_store_fpregset): Likewise.
1925 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1927 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1930 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1932 * linux-mips-low.c (mips_linux_new_thread): Change type of
1933 watch_type to enum target_hw_bp_type.
1935 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1937 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1938 Change return type to arm_hwbp_type.
1940 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1942 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1943 (arm_store_gregset): Likewise.
1944 * linux-arm-low.c (arm_get_hwcap): Likewise.
1945 (arm_read_description): Likewise.
1947 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1949 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1951 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1953 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1954 (ppc_fill_vsxregset): Likewise.
1955 (ppc_store_vsxregset): Likewise.
1956 (ppc_fill_vrregset): Likewise.
1957 (ppc_store_vrregset): Likewise.
1958 (ppc_fill_evrregset): Likewise.
1959 (ppc_store_evrregset): Likewise.
1961 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1963 * linux-ppc-low.c (ppc_usrregs_info): Remove
1964 forward-declaration.
1965 (ppc_arch_setup): Move lower in file.
1967 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1969 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1970 (ps_pdwrite): Likewise.
1972 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1974 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1975 to after assert checks.
1977 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1979 * proc-service.c (ps_pdread): Add/adjust casts.
1980 (ps_pdwrite): Add/adjust casts.
1982 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1984 * server.c (handle_search_memory_1): Cast return value of
1987 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1989 * server.c (write_qxfer_response): Change type of data to
1992 2015-10-29 Pedro Alves <palves@redhat.com>
1994 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1996 2015-10-29 Pedro Alves <palves@redhat.com>
1998 * tracepoint.c (clear_installed_tracepoints): Add casts.
2000 2015-10-29 Pedro Alves <palves@redhat.com>
2002 * server.c (handle_v_cont, process_serial_event): Add enum
2003 gdb_signal casts to signal parsing code.
2005 2015-10-29 Pedro Alves <palves@redhat.com>
2007 * linux-low.h (NULL_REGSET): Define.
2008 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2009 * linux-arm-low.c (arm_regsets): Likewise.
2010 * linux-crisv32-low.c (cris_regsets): Likewise.
2011 * linux-m68k-low.c (m68k_regsets): Likewise.
2012 * linux-mips-low.c (mips_regsets): Likewise.
2013 * linux-nios2-low.c (nios2_regsets): Likewise.
2014 * linux-ppc-low.c (ppc_regsets): Likewise.
2015 * linux-s390-low.c (s390_regsets): Likewise.
2016 * linux-sh-low.c (sh_regsets): Likewise.
2017 * linux-sparc-low.c (sparc_regsets): Likewise.
2018 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2019 * linux-tile-low.c (tile_regsets): Likewise.
2020 * linux-x86-low.c (x86_regsets): Likewise.
2021 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2023 2015-10-29 Pedro Alves <palves@redhat.com>
2025 * linux-low.h (NULL_REGSET): Define.
2026 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2027 * linux-arm-low.c (arm_regsets): Likewise.
2028 * linux-crisv32-low.c (cris_regsets): Likewise.
2029 * linux-m68k-low.c (m68k_regsets): Likewise.
2030 * linux-mips-low.c (mips_regsets): Likewise.
2031 * linux-nios2-low.c (nios2_regsets): Likewise.
2032 * linux-ppc-low.c (ppc_regsets): Likewise.
2033 * linux-s390-low.c (s390_regsets): Likewise.
2034 * linux-sh-low.c (sh_regsets): Likewise.
2035 * linux-sparc-low.c (sparc_regsets): Likewise.
2036 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2037 * linux-tile-low.c (tile_regsets): Likewise.
2038 * linux-x86-low.c (x86_regsets): Likewise.
2039 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2041 2015-10-26 Doug Evans <dje@google.com>
2043 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2045 2015-10-26 Doug Evans <dje@google.com>
2047 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2049 2015-10-26 Doug Evans <dje@google.com>
2051 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2053 (attach_thread, find_new_threads_callback): Ditto.
2055 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2057 * mem-break.h (set_breakpoint_data): Remove.
2059 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2061 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2062 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2063 (initialize_low): Remove set_breakpoint_data call.
2064 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2065 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2066 (initialize_low): Remove set_breakpoint_data call.
2067 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2068 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2069 (initialize_low): Remove set_breakpoint_data call.
2071 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2073 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2074 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2075 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2076 * target.h (target_breakpoint_kind_from_pc): New macro.
2078 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2080 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2081 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2082 the default breakpoint kind.
2084 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2086 * linux-arm-low.c (arm_supports_z_point_type): Add software
2089 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2091 * linux-arm-low.c: Refactor breakpoint definitions.
2092 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2093 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2095 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2097 * Makefile.in: Add arm.c/o.
2098 * configure.srv: Likewise.
2099 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2100 (arm_breakpoint_kind_from_pc): New function.
2101 (arm_sw_breakpoint_from_kind): Return proper kind.
2102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2104 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2106 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2108 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2109 (struct raw_breakpoint) <size>: Remove.
2110 (struct raw_breakpoint) <kind>: Add.
2111 (bp_size): New function.
2112 (bp_opcode): Likewise.
2113 (find_raw_breakpoint_at): Adjust for kind.
2114 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2115 (remove_memory_breakpoint): Adjust for kind call bp_size.
2116 (set_raw_breakpoint_at): Adjust for kind.
2117 (set_breakpoint): Likewise.
2118 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2119 (delete_raw_breakpoint): Adjust for kind.
2120 (delete_breakpoint): Likewise.
2121 (find_gdb_breakpoint): Likewise.
2122 (set_gdb_breakpoint_1): Likewise.
2123 (set_gdb_breakpoint): Likewise.
2124 (delete_gdb_breakpoint_1): Likewise.
2125 (delete_gdb_breakpoint): Likewise.
2126 (uninsert_raw_breakpoint): Likewise.
2127 (reinsert_raw_breakpoint): Likewise.
2128 (set_breakpoint_data): Remove.
2129 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2130 (check_mem_read): Adjust for kind call bp_size.
2131 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2132 (clone_one_breakpoint): Adjust for kind.
2133 * mem-break.h (set_gdb_breakpoint): Likewise.
2134 (delete_gdb_breakpoint): Likewise.
2135 * server.c (process_serial_event): Likewise.
2137 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2139 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2140 (struct linux_target_ops) <breakpoint>: Remove.
2141 (struct linux_target_ops) <breakpoint_len>: Remove.
2142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2144 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2145 (arm_sw_breakpoint_from_kind): New function.
2146 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2147 (struct linux_target_ops) <breakpoint>: Remove.
2148 (struct linux_target_ops) <breakpoint_len>: Remove.
2149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2151 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2152 (struct linux_target_ops) <breakpoint>: Remove.
2153 (struct linux_target_ops) <breakpoint_len>: Remove.
2154 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2156 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2157 (struct linux_target_ops) <breakpoint>: Remove.
2158 (struct linux_target_ops) <breakpoint_len>: Remove.
2159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2160 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2161 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2162 and sw_breakpoint_from_kind to increment the pc.
2163 (linux_breakpoint_kind_from_pc): New function.
2164 (linux_sw_breakpoint_from_kind): New function.
2165 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2166 (initialize_low): Call breakpoint_kind_from_pc and
2167 sw_breakpoint_from_kind to replace breakpoint_data/len.
2168 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2171 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2172 (struct linux_target_ops) <breakpoint>: Remove.
2173 (struct linux_target_ops) <breakpoint_len>: Remove.
2174 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2175 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2176 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2177 (struct linux_target_ops) <breakpoint>: Remove.
2178 (struct linux_target_ops) <breakpoint_len>: Remove.
2179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2181 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2182 (struct linux_target_ops) <breakpoint>: Remove.
2183 (struct linux_target_ops) <breakpoint_len>: Remove.
2184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2186 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2187 (struct linux_target_ops) <breakpoint>: Remove.
2188 (struct linux_target_ops) <breakpoint_len>: Remove.
2189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2191 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2192 (struct linux_target_ops) <breakpoint>: Remove.
2193 (struct linux_target_ops) <breakpoint_len>: Remove.
2194 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2195 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2196 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2197 (struct linux_target_ops) <breakpoint>: Remove.
2198 (struct linux_target_ops) <breakpoint_len>: Remove.
2199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2201 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2202 (struct linux_target_ops) <breakpoint>: Remove.
2203 (struct linux_target_ops) <breakpoint_len>: Remove.
2204 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2205 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2206 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2207 (struct linux_target_ops) <breakpoint>: Remove.
2208 (struct linux_target_ops) <breakpoint_len>: Remove.
2209 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2211 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2212 (struct linux_target_ops) <breakpoint>: Remove.
2213 (struct linux_target_ops) <breakpoint_len>: Remove.
2214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2215 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2216 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2217 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2218 (struct linux_target_ops) <breakpoint>: Remove.
2219 (struct linux_target_ops) <breakpoint_len>: Remove.
2220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2222 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2223 (struct linux_target_ops) <breakpoint>: Remove.
2224 (struct linux_target_ops) <breakpoint_len>: Remove.
2225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2228 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2230 * linux-cris-low.c (cris_get_pc): Remove void arg.
2232 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2234 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2237 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2239 * inferiors.c (thread_pid_matches_callback): New function.
2240 (find_thread_process): New function.
2241 (remove_thread): Reset current_thread.
2242 (remove_process): Assert threads have been removed first.
2244 2015-10-15 Yao Qi <yao.qi@linaro.org>
2246 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2248 (aarch64_remove_point): Likewise.
2249 * regcache.c (regcache_register_size): New function.
2251 2015-10-12 Yao Qi <yao.qi@linaro.org>
2253 * linux-aarch64-low.c: Update all callers as emit_load_store
2254 is renamed to aarch64_emit_load_store.
2256 2015-10-12 Yao Qi <yao.qi@linaro.org>
2258 * linux-aarch64-low.c: Update all callers of function renaming
2259 from emit_insn to aarch64_emit_insn.
2261 2015-10-12 Yao Qi <yao.qi@linaro.org>
2263 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2264 arch/aarch64-insn.h.
2265 (struct aarch64_memory_operand): Likewise.
2267 (emit_insn): Move to arch/aarch64-insn.c.
2268 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2269 (emit_load_store): Move to arch/aarch64-insn.c.
2270 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2271 (can_encode_int32): Remove.
2273 2015-10-12 Yao Qi <yao.qi@linaro.org>
2275 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2276 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2277 (aarch64_relocate_instruction): Likewise.
2278 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2279 (struct aarch64_insn_visitor): Likewise.
2281 2015-10-12 Yao Qi <yao.qi@linaro.org>
2283 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2284 (struct aarch64_insn_visitor): New.
2285 (struct aarch64_insn_relocation_data): New.
2286 (aarch64_ftrace_insn_reloc_b): New function.
2287 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2288 (aarch64_ftrace_insn_reloc_cb): Likewise.
2289 (aarch64_ftrace_insn_reloc_tb): Likewise.
2290 (aarch64_ftrace_insn_reloc_adr): Likewise.
2291 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2292 (aarch64_ftrace_insn_reloc_others): Likewise.
2294 (aarch64_relocate_instruction): Use visitor.
2296 2015-10-12 Yao Qi <yao.qi@linaro.org>
2298 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2299 int. Add argument buf.
2300 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2301 aarch64_relocate_instruction.
2303 2015-10-12 Yao Qi <yao.qi@linaro.org>
2305 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2306 argument insn. Remove local variable insn. Don't call
2308 (aarch64_install_fast_tracepoint_jump_pad): Call
2311 2015-09-30 Yao Qi <yao.qi@linaro.org>
2313 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2314 (emit_load_store_pair): Likewise.
2316 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2318 * dll.c (match_dll): Add cast(s).
2319 (unloaded_dll): Likewise.
2320 * linux-low.c (second_thread_of_pid_p): Likewise.
2321 (delete_lwp_callback): Likewise.
2322 (count_events_callback): Likewise.
2323 (select_event_lwp_callback): Likewise.
2324 (linux_set_resume_request): Likewise.
2325 * server.c (accumulate_file_name_length): Likewise.
2326 (emit_dll_description): Likewise.
2327 (handle_qxfer_threads_worker): Likewise.
2328 (visit_actioned_threads): Likewise.
2329 * thread-db.c (any_thread_of): Likewise.
2330 * tracepoint.c (same_process_p): Likewise.
2331 (match_blocktype): Likewise.
2332 (build_traceframe_info_xml): Likewise.
2334 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2336 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2338 (gdb_unparse_agent_expr): Likewise.
2339 * hostio.c (require_data): Likewise.
2340 (handle_pread): Likewise.
2341 * linux-low.c (disable_regset): Likewise.
2342 (fetch_register): Likewise.
2343 (store_register): Likewise.
2344 (get_dynamic): Likewise.
2345 (linux_qxfer_libraries_svr4): Likewise.
2346 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2347 (set_fast_tracepoint_jump): Likewise.
2348 (uninsert_fast_tracepoint_jumps_at): Likewise.
2349 (reinsert_fast_tracepoint_jumps_at): Likewise.
2350 (validate_inserted_breakpoint): Likewise.
2351 (clone_agent_expr): Likewise.
2352 * regcache.c (init_register_cache): Likewise.
2353 * remote-utils.c (putpkt_binary_1): Likewise.
2354 (decode_M_packet): Likewise.
2355 (decode_X_packet): Likewise.
2356 (look_up_one_symbol): Likewise.
2357 (relocate_instruction): Likewise.
2358 (monitor_output): Likewise.
2359 * server.c (handle_search_memory): Likewise.
2360 (handle_qxfer_exec_file): Likewise.
2361 (handle_qxfer_libraries): Likewise.
2362 (handle_qxfer): Likewise.
2363 (handle_query): Likewise.
2364 (handle_v_cont): Likewise.
2365 (handle_v_run): Likewise.
2366 (captured_main): Likewise.
2367 * target.c (write_inferior_memory): Likewise.
2368 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2369 * tracepoint.c (init_trace_buffer): Likewise.
2370 (add_tracepoint_action): Likewise.
2371 (add_traceframe): Likewise.
2372 (add_traceframe_block): Likewise.
2373 (cmd_qtdpsrc): Likewise.
2374 (cmd_qtdv): Likewise.
2375 (cmd_qtstatus): Likewise.
2376 (response_source): Likewise.
2377 (response_tsv): Likewise.
2378 (cmd_qtnotes): Likewise.
2379 (gdb_collect): Likewise.
2380 (initialize_tracepoint): Likewise.
2382 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2384 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2385 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2386 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2388 (enum aarch64_condition_codes): New enum.
2389 (w0): New static global.
2392 (struct aarch64_memory_operand) <type>: New
2393 MEMORY_OPERAND_POSTINDEX type.
2394 (postindex_memory_operand): New helper function.
2395 (emit_ret): New function.
2396 (emit_load_store_pair): New function, factored out of emit_stp
2397 with support for MEMORY_OPERAND_POSTINDEX.
2398 (emit_stp): Rewrite using emit_load_store_pair.
2399 (emit_ldp): New function.
2400 (emit_load_store): Likewise.
2401 (emit_ldr): Mention post-index instruction in comment.
2402 (emit_ldrh): New function.
2403 (emit_ldrb): New function.
2404 (emit_ldrsw): Mention post-index instruction in comment.
2405 (emit_str): Likewise.
2406 (emit_subs): New function.
2407 (emit_cmp): Likewise.
2408 (emit_and): Likewise.
2409 (emit_orr): Likewise.
2410 (emit_orn): Likewise.
2411 (emit_eor): Likewise.
2412 (emit_mvn): Likewise.
2413 (emit_lslv): Likewise.
2414 (emit_lsrv): Likewise.
2415 (emit_asrv): Likewise.
2416 (emit_mul): Likewise.
2417 (emit_sbfm): Likewise.
2418 (emit_sbfx): Likewise.
2419 (emit_ubfm): Likewise.
2420 (emit_ubfx): Likewise.
2421 (emit_csinc): Likewise.
2422 (emit_cset): Likewise.
2423 (emit_nop): Likewise.
2424 (emit_ops_insns): New helper function.
2425 (emit_pop): Likewise.
2426 (emit_push): Likewise.
2427 (aarch64_emit_prologue): New function.
2428 (aarch64_emit_epilogue): Likewise.
2429 (aarch64_emit_add): Likewise.
2430 (aarch64_emit_sub): Likewise.
2431 (aarch64_emit_mul): Likewise.
2432 (aarch64_emit_lsh): Likewise.
2433 (aarch64_emit_rsh_signed): Likewise.
2434 (aarch64_emit_rsh_unsigned): Likewise.
2435 (aarch64_emit_ext): Likewise.
2436 (aarch64_emit_log_not): Likewise.
2437 (aarch64_emit_bit_and): Likewise.
2438 (aarch64_emit_bit_or): Likewise.
2439 (aarch64_emit_bit_xor): Likewise.
2440 (aarch64_emit_bit_not): Likewise.
2441 (aarch64_emit_equal): Likewise.
2442 (aarch64_emit_less_signed): Likewise.
2443 (aarch64_emit_less_unsigned): Likewise.
2444 (aarch64_emit_ref): Likewise.
2445 (aarch64_emit_if_goto): Likewise.
2446 (aarch64_emit_goto): Likewise.
2447 (aarch64_write_goto_address): Likewise.
2448 (aarch64_emit_const): Likewise.
2449 (aarch64_emit_call): Likewise.
2450 (aarch64_emit_reg): Likewise.
2451 (aarch64_emit_pop): Likewise.
2452 (aarch64_emit_stack_flush): Likewise.
2453 (aarch64_emit_zero_ext): Likewise.
2454 (aarch64_emit_swap): Likewise.
2455 (aarch64_emit_stack_adjust): Likewise.
2456 (aarch64_emit_int_call_1): Likewise.
2457 (aarch64_emit_void_call_2): Likewise.
2458 (aarch64_emit_eq_goto): Likewise.
2459 (aarch64_emit_ne_goto): Likewise.
2460 (aarch64_emit_lt_goto): Likewise.
2461 (aarch64_emit_le_goto): Likewise.
2462 (aarch64_emit_gt_goto): Likewise.
2463 (aarch64_emit_ge_got): Likewise.
2464 (aarch64_emit_ops_impl): New static global variable.
2465 (aarch64_emit_ops): New target function, return
2466 &aarch64_emit_ops_impl.
2467 (struct linux_target_ops): Install it.
2469 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2471 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2472 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2474 * linux-aarch64-ipa.c: New file.
2475 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2477 (aarch64_get_thread_area): New target method.
2478 (extract_signed_bitfield): New helper function.
2479 (aarch64_decode_ldr_literal): New function.
2480 (enum aarch64_opcodes): New enum.
2481 (struct aarch64_register): New struct.
2482 (struct aarch64_operand): New struct.
2483 (x0): New static global.
2492 (aarch64_register): New helper function.
2493 (register_operand): Likewise.
2494 (immediate_operand): Likewise.
2495 (struct aarch64_memory_operand): New struct.
2496 (offset_memory_operand): New helper function.
2497 (preindex_memory_operand): Likewise.
2498 (enum aarch64_system_control_registers): New enum.
2499 (ENCODE): New macro.
2500 (emit_insn): New helper function.
2501 (emit_b): New function.
2502 (emit_bcond): Likewise.
2503 (emit_cb): Likewise.
2504 (emit_tb): Likewise.
2505 (emit_blr): Likewise.
2506 (emit_stp): Likewise.
2507 (emit_ldp_q_offset): Likewise.
2508 (emit_stp_q_offset): Likewise.
2509 (emit_load_store): Likewise.
2510 (emit_ldr): Likewise.
2511 (emit_ldrsw): Likewise.
2512 (emit_str): Likewise.
2513 (emit_ldaxr): Likewise.
2514 (emit_stxr): Likewise.
2515 (emit_stlr): Likewise.
2516 (emit_data_processing_reg): Likewise.
2517 (emit_data_processing): Likewise.
2518 (emit_add): Likewise.
2519 (emit_sub): Likewise.
2520 (emit_mov): Likewise.
2521 (emit_movk): Likewise.
2522 (emit_mov_addr): Likewise.
2523 (emit_mrs): Likewise.
2524 (emit_msr): Likewise.
2525 (emit_sevl): Likewise.
2526 (emit_wfe): Likewise.
2527 (append_insns): Likewise.
2528 (can_encode_int32_in): New helper function.
2529 (aarch64_relocate_instruction): New function.
2530 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2531 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2532 (struct linux_target_ops): Install aarch64_get_thread_area,
2533 aarch64_install_fast_tracepoint_jump_pad and
2534 aarch64_get_min_fast_tracepoint_insn_len.
2536 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2538 * Makefile.in (aarch64-insn.o): New rule.
2539 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2541 2015-09-21 Yao Qi <yao.qi@linaro.org>
2543 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2545 2015-09-21 Yao Qi <yao.qi@linaro.org>
2547 * tracepoint.c (max_jump_pad_size): Remove.
2549 2015-09-18 Yao Qi <yao.qi@linaro.org>
2551 * linux-aarch64-low.c: Don't include sys/uio.h.
2552 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2554 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2556 * tracepoint.c (eval_result_type): Change prototype.
2557 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2559 2015-09-15 Pedro Alves <palves@redhat.com>
2561 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2562 Check whether to report exec events instead of checking whether
2563 multiprocess is enabled.
2565 2015-09-15 Pedro Alves <palves@redhat.com>
2568 * remote-utils.c (prepare_resume_reply): Merge
2569 TARGET_WAITKIND_VFORK_DONE switch case with the
2570 TARGET_WAITKIND_FORKED case.
2572 2015-09-15 Yao Qi <yao.qi@linaro.org>
2574 * server.c (handle_query): Check string comparison using
2575 "else if" instead of "if".
2577 2015-09-15 Yao Qi <yao.qi@linaro.org>
2579 * server.c (vCont_supported): New global variable.
2580 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2581 matches. Append ";vContSupported+" to own_buf.
2582 (handle_v_requests): Append ";s;S" to own_buf if target supports
2583 hardware single step or vCont_supported is false.
2584 (capture_main): Set vCont_supported to zero.
2586 2015-09-15 Yao Qi <yao.qi@linaro.org>
2588 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2590 (linux_supports_hardware_single_step): ... New function.
2591 (linux_target_ops): Update.
2592 * lynx-low.c (lynx_target_ops): Set field
2593 supports_hardware_single_step to target_can_do_hardware_single_step.
2594 * nto-low.c (nto_target_ops): Likewise.
2595 * spu-low.c (spu_target_ops): Likewise.
2596 * win32-low.c (win32_target_ops): Likewise.
2597 * target.c (target_can_do_hardware_single_step): New function.
2598 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2599 Remove. <supports_hardware_single_step>: New field.
2600 (target_supports_conditional_breakpoints): Remove.
2601 (target_supports_hardware_single_step): New macro.
2602 (target_can_do_hardware_single_step): Declare.
2603 * server.c (handle_query): Use target_supports_hardware_single_step
2604 instead of target_supports_conditional_breakpoints.
2606 2015-09-15 Yao Qi <yao.qi@linaro.org>
2608 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2610 (struct linux_target_ops the_low_target): Install
2611 aarch64_linux_siginfo_fixup.
2613 2015-09-11 Don Breazeal <donb@codesourcery.com>
2614 Luis Machado <lgustavo@codesourcery.com>
2616 * linux-low.c (linux_mourn): Static declaration.
2617 (linux_arch_setup): Move in front of
2618 handle_extended_wait.
2619 (linux_arch_setup_thread): New function.
2620 (handle_extended_wait): Handle exec events. Call
2621 linux_arch_setup_thread. Make event_lwp argument a
2622 pointer-to-a-pointer.
2623 (check_zombie_leaders): Do not check stopped threads.
2624 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2625 (linux_low_filter_event): Add lwp and thread for exec'ing
2626 non-leader thread if leader thread has been deleted.
2627 Refactor code into linux_arch_setup_thread and call it.
2628 Pass child lwp pointer by reference to handle_extended_wait.
2629 (linux_wait_for_event_filtered): Update comment.
2630 (linux_wait_1): Prevent clobbering exec event status.
2631 (linux_supports_exec_events): New function.
2632 (linux_target_ops) <supports_exec_events>: Initialize new member.
2633 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2635 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2636 * server.c (report_exec_events): New global variable.
2637 (handle_query): Handle qSupported query for exec-events feature.
2638 (captured_main): Initialize report_exec_events.
2639 * server.h (report_exec_events): Declare new global variable.
2640 * target.h (struct target_ops) <supports_exec_events>: New
2642 (target_supports_exec_events): New macro.
2643 * win32-low.c (win32_target_ops) <supports_exec_events>:
2644 Initialize new member.
2646 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2648 * linux-low.c (linux_low_enable_btrace): Remove.
2649 (linux_target_ops): Replace linux_low_enable_btrace with
2650 linux_enable_btrace.
2652 2015-09-03 Yao Qi <yao.qi@linaro.org>
2654 * linux-aarch64-low.c (aarch64_insert_point): Call
2655 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2658 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2660 * linux-low.c (check_stopped_by_breakpoint): Use
2661 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2663 2015-08-27 Pedro Alves <palves@redhat.com>
2665 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2667 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2669 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2670 the XNEW-family equivalent.
2671 (compile_bytecodes): Likewise.
2672 * dll.c (loaded_dll): Likewise.
2673 * event-loop.c (append_callback_event): Likewise.
2674 (create_file_handler): Likewise.
2675 (create_file_event): Likewise.
2676 * hostio.c (handle_open): Likewise.
2677 * inferiors.c (add_thread): Likewise.
2678 (add_process): Likewise.
2679 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2680 * linux-arm-low.c (arm_new_process): Likewise.
2681 (arm_new_thread): Likewise.
2682 * linux-low.c (add_to_pid_list): Likewise.
2683 (linux_add_process): Likewise.
2684 (handle_extended_wait): Likewise.
2685 (add_lwp): Likewise.
2686 (enqueue_one_deferred_signal): Likewise.
2687 (enqueue_pending_signal): Likewise.
2688 (linux_resume_one_lwp_throw): Likewise.
2689 (linux_resume_one_thread): Likewise.
2690 (linux_read_memory): Likewise.
2691 (linux_write_memory): Likewise.
2692 * linux-mips-low.c (mips_linux_new_process): Likewise.
2693 (mips_linux_new_thread): Likewise.
2694 (mips_add_watchpoint): Likewise.
2695 * linux-x86-low.c (initialize_low_arch): Likewise.
2696 * lynx-low.c (lynx_add_process): Likewise.
2697 * mem-break.c (set_raw_breakpoint_at): Likewise.
2698 (set_breakpoint): Likewise.
2699 (add_condition_to_breakpoint): Likewise.
2700 (add_commands_to_breakpoint): Likewise.
2701 (clone_agent_expr): Likewise.
2702 (clone_one_breakpoint): Likewise.
2703 * regcache.c (new_register_cache): Likewise.
2704 * remote-utils.c (look_up_one_symbol): Likewise.
2705 * server.c (queue_stop_reply): Likewise.
2706 (start_inferior): Likewise.
2707 (queue_stop_reply_callback): Likewise.
2708 (handle_target_event): Likewise.
2709 * spu-low.c (fetch_ppc_memory): Likewise.
2710 (store_ppc_memory): Likewise.
2711 * target.c (set_target_ops): Likewise.
2712 * thread-db.c (thread_db_load_search): Likewise.
2713 (try_thread_db_load_1): Likewise.
2714 * tracepoint.c (add_tracepoint): Likewise.
2715 (add_tracepoint_action): Likewise.
2716 (create_trace_state_variable): Likewise.
2717 (cmd_qtdpsrc): Likewise.
2718 (cmd_qtro): Likewise.
2719 (add_while_stepping_state): Likewise.
2720 * win32-low.c (child_add_thread): Likewise.
2721 (get_image_name): Likewise.
2723 2015-08-25 Yao Qi <yao.qi@linaro.org>
2725 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2727 2015-08-25 Yao Qi <yao.qi@linaro.org>
2729 * Makefile.in (aarch64-linux.o): New rule.
2730 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2732 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2733 (aarch64_init_debug_reg_state): Make it extern.
2734 (aarch64_linux_prepare_to_resume): Remove.
2736 2015-08-25 Yao Qi <yao.qi@linaro.org>
2738 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2739 lwp_arch_private_info and ptid_of_lwp.
2741 2015-08-25 Yao Qi <yao.qi@linaro.org>
2743 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2744 Find proc_info by find_process_pid. All callers updated.
2746 2015-08-25 Yao Qi <yao.qi@linaro.org>
2748 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2750 (debug_reg_change_callback): Remove.
2751 (aarch64_notify_debug_reg_change): Remove.
2753 2015-08-25 Yao Qi <yao.qi@linaro.org>
2755 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2756 Call current_lwp_ptid.
2758 2015-08-25 Yao Qi <yao.qi@linaro.org>
2760 * linux-aarch64-low.c (debug_reg_change_callback): Use
2763 2015-08-25 Yao Qi <yao.qi@linaro.org>
2765 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2767 2015-08-25 Yao Qi <yao.qi@linaro.org>
2769 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2771 2015-08-25 Yao Qi <yao.qi@linaro.org>
2773 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2776 2015-08-25 Yao Qi <yao.qi@linaro.org>
2778 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2780 (debug_reg_change_callback): Remove argument entry and add argument
2781 lwp. Remove local variable thread. Don't print thread id in the
2782 debugging output. Don't check whether pid of thread equals to pid.
2783 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2784 iterate_over_lwps instead find_inferior.
2786 2015-08-24 Pedro Alves <palves@redhat.com>
2788 * inferiors.c (get_first_process): New function.
2789 * inferiors.h (get_first_process): New declaration.
2790 * remote-utils.c (read_ptid): Default to the first process in the
2791 list, instead of to the current thread's process.
2793 2015-08-24 Pedro Alves <palves@redhat.com>
2795 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2796 * event-loop.c: Likewise.
2797 * remote-utils.c: Likewise.
2798 * tracepoint.c: Likewise.
2800 2015-08-24 Pedro Alves <palves@redhat.com>
2802 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2805 2015-08-21 Pedro Alves <palves@redhat.com>
2807 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2808 instead of literal 1.
2810 2015-08-21 Pedro Alves <palves@redhat.com>
2812 * tdesc.c (default_description): Explicitly zero-initialize.
2814 2015-08-21 Pedro Alves <palves@redhat.com>
2817 * inferiors.c (remove_thread): Discard any pending stop reply for
2819 * server.c (remove_all_on_match_pid): Rename to ...
2820 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2822 (discard_queued_stop_replies): Change parameter to a ptid. Now
2824 (handle_v_kill, kill_inferior_callback, captured_main)
2825 (process_serial_event): Adjust.
2826 * server.h (discard_queued_stop_replies): Declare.
2828 2015-08-21 Pedro Alves <palves@redhat.com>
2830 * linux-low.c (wait_for_sigstop): Always switch to no thread
2831 selected if the previously current thread dies.
2832 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2833 process instead of the current thread's.
2834 * remote-utils.c (input_interrupt): Don't check if there's no
2836 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2837 current thread to the general thread fails, error out.
2838 (handle_qxfer_auxv, handle_qxfer_libraries)
2839 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2840 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2841 (handle_query): Check if there's a thread selected instead of
2842 checking whether there's any thread in the thread list.
2843 (handle_qxfer_threads, handle_qxfer_btrace)
2844 (handle_qxfer_btrace_conf): Don't error out early if there's no
2845 thread in the thread list.
2846 (handle_v_cont, myresume): Don't set the current thread to the
2848 (process_serial_event) <Hg handling>: Also set thread_id if the
2849 previous general thread is still alive.
2850 (process_serial_event) <g/G handling>: If setting the current
2851 thread to the general thread fails, error out.
2852 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2853 thread's lwp instead of the current thread's.
2854 * target.c (set_desired_thread): If the desired thread was not
2855 found, leave the current thread pointing to NULL. Return an int
2856 (boolean) indicating success.
2857 * target.h (set_desired_thread): Change return type to int.
2859 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2861 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2862 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2864 (ps_get_thread_area): New function.
2866 2015-08-19 Gary Benson <gbenson@redhat.com>
2868 * hostio.c (handle_pread): Do not attempt to read more data
2869 than hostio_reply_with_data can fit in a packet.
2871 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2873 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2875 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2877 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2879 2015-08-06 Pedro Alves <palves@redhat.com>
2881 * tracepoint.c (expr_eval_result): Now an int.
2883 2015-08-06 Pedro Alves <palves@redhat.com>
2885 * gdbthread.h (struct regcache): Forward declare.
2886 (struct thread_info) <regcache_data>: Now a struct regcache
2888 * inferiors.c (inferior_regcache_data)
2889 (set_inferior_regcache_data): Now work with struct regcache
2891 * inferiors.h (struct regcache): Forward declare.
2892 (inferior_regcache_data, set_inferior_regcache_data): Now work
2893 with struct regcache pointers.
2894 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2895 (free_register_cache_thread): Remove struct regcache pointer
2898 2015-08-06 Pedro Alves <palves@redhat.com>
2900 * server.c (captured_main): On error, print the exception message
2901 to stderr, and if run_once is set, throw a quit.
2903 2015-08-06 Pedro Alves <palves@redhat.com>
2905 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2908 2015-08-06 Pedro Alves <palves@redhat.com>
2910 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2911 reading beyond the passed in buffer length.
2913 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2915 * tracepoint.c (symbol_list) <required>: Remove.
2917 2015-08-06 Pedro Alves <palves@redhat.com>
2919 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2920 count if stopping and suspending threads.
2921 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2922 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2923 (linux_detach): Complete an ongoing step-over.
2924 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2926 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2927 (linux_wait_1): If passing a signal to the inferior after
2928 finishing a step-over, unsuspend and re-resume all lwps. If we
2929 see a single-step event but the thread should be continuing, don't
2930 pass the trap to gdb.
2931 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2932 internal_error instead of gdb_assert.
2933 (enqueue_pending_signal): New function.
2934 (check_ptrace_stopped_lwp_gone): Add debug output.
2935 (start_step_over): Use internal_error instead of gdb_assert.
2936 (complete_ongoing_step_over): New function.
2937 (linux_resume_one_thread): Don't resume a suspended thread.
2938 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2941 2015-08-06 Pedro Alves <palves@redhat.com>
2943 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2944 (linux_thread_alive): Use lwp_is_marked_dead.
2945 (extended_event_reported): Delete.
2946 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2947 instead of extended_event_reported.
2948 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2950 (lwp_is_marked_dead): New function.
2951 (lwp_running): Use lwp_is_marked_dead.
2952 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2955 2015-08-06 Pedro Alves <palves@redhat.com>
2957 * linux-low.c (linux_wait_1): Move fork event output out of the
2958 !report_to_gdb check. Pass event_child->waitstatus to
2959 target_waitstatus_to_string instead of ourstatus.
2961 2015-08-04 Yao Qi <yao.qi@linaro.org>
2963 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2964 if current_thread is 32 bit.
2966 2015-08-04 Yao Qi <yao.qi@linaro.org>
2968 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2969 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2970 * server.c (extended_protocol): Remove "static".
2971 * server.h (extended_protocol): Declare it.
2973 2015-08-04 Yao Qi <yao.qi@linaro.org>
2975 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2976 both aarch64 and aarch32.
2977 (aarch64_set_pc): Likewise.
2979 2015-08-04 Yao Qi <yao.qi@linaro.org>
2981 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2982 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2983 arm-with-neon.xml to srv_xmlfiles.
2984 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2985 (is_64bit_tdesc): New function.
2986 (aarch64_linux_read_description): New function.
2987 (aarch64_arch_setup): Call aarch64_linux_read_description.
2988 (regs_info): Rename to regs_info_aarch64.
2989 (aarch64_regs_info): Return right regs_info.
2990 (initialize_low_arch): Call initialize_low_arch_aarch32.
2992 2015-08-04 Yao Qi <yao.qi@linaro.org>
2994 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2995 * linux-aarch32-low.c: New file.
2996 * linux-aarch32-low.h: New file.
2997 * linux-arm-low.c (arm_fill_gregset): Move it to
2998 linux-aarch32-low.c.
2999 (arm_store_gregset): Likewise.
3000 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3001 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3002 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3003 (regs_info): Rename to regs_info_arm.
3004 (arm_regs_info): Return regs_info_aarch32 if
3005 have_ptrace_getregset is 1 and target description is
3006 arm_with_neon or arm_with_vfpv3.
3007 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3008 Call initialize_low_arch_aarch32 instead.
3010 2015-08-04 Yao Qi <yao.qi@linaro.org>
3012 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3013 * linux-low.c: ... here.
3014 * linux-low.h (have_ptrace_getregset): Declare it.
3016 2015-08-04 Pedro Alves <palves@redhat.com>
3018 * thread-db.c (struct thread_db): Use new typedefs.
3019 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3021 (disable_thread_event_reporting): Cast result of dlsym to
3022 destination function pointer type.
3023 (thread_db_mourn): Use td_ta_delete_ftype.
3025 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3027 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3029 (CDX_BREAKPOINT): Define for R2.
3030 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3031 (the_low_target): Add comments.
3033 2015-07-30 Yao Qi <yao.qi@linaro.org>
3035 * linux-arm-low.c (arm_hwcap): Remove it.
3036 (arm_read_description): New local variable arm_hwcap. Don't
3037 set arm_hwcap to zero.
3039 2015-07-30 Yao Qi <yao.qi@linaro.org>
3041 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3042 Use regcache->tdesc instead.
3043 (arm_store_wmmxregset): Likewise.
3044 (arm_fill_vfpregset): Likewise.
3045 (arm_store_vfpregset): Likewise.
3047 2015-07-30 Yao Qi <yao.qi@linaro.org>
3049 * linux-arm-low.c: Include arch/arm.h.
3050 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3051 (arm_store_gregset): Likewise.
3053 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3055 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3056 ptrace's 4th parameter.
3058 2015-07-27 Yao Qi <yao.qi@linaro.org>
3060 * configure.srv (case aarch64*-*-linux*): Don't set
3063 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3065 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3067 * linux-arm-low.c: Likewise.
3068 * linux-cris-low.c: Likewise.
3069 * linux-crisv32-low.c: Likewise.
3070 * linux-low.c: Likewise.
3071 * linux-m68k-low.c: Likewise.
3072 * linux-mips-low.c: Likewise.
3073 * linux-nios2-low.c: Likewise.
3074 * linux-s390-low.c: Likewise.
3075 * linux-sparc-low.c: Likewise.
3076 * linux-tic6x-low.c: Likewise.
3077 * linux-tile-low.c: Likewise.
3078 * linux-x86-low.c: Likewise.
3080 2015-07-24 Pedro Alves <palves@redhat.com>
3082 * config.in: Regenerate.
3083 * configure: Regenerate.
3085 2015-07-24 Pedro Alves <palves@redhat.com>
3087 * acinclude.m4: Include ../ptrace.m4.
3088 * configure.ac: Call GDB_AC_PTRACE.
3089 * config.in, configure: Regenerate.
3091 2015-07-24 Yao Qi <yao.qi@linaro.org>
3093 * linux-low.c (linux_create_inferior): Remove setting to
3094 proc->priv->new_inferior.
3095 (linux_attach): Likewise.
3096 (linux_low_filter_event): Likewise.
3097 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3099 2015-07-24 Yao Qi <yao.qi@linaro.org>
3101 * linux-low.c (linux_arch_setup): New function.
3102 (linux_low_filter_event): If proc->tdesc is NULL and
3103 proc->attached is true, call the_low_target.arch_setup.
3104 Otherwise, keep status pending, and return.
3105 (linux_resume_one_lwp_throw): Don't call get_pc if
3106 thread->while_stepping isn't NULL. Don't call
3107 get_thread_regcache if proc->tdesc is NULL.
3108 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3109 (linux_target_ops): Install arch_setup.
3110 * server.c (start_inferior): Call the_target->arch_setup.
3111 * target.h (struct target_ops) <arch_setup>: New field.
3112 (target_arch_setup): New marco.
3113 * lynx-low.c (lynx_target_ops): Update.
3114 * nto-low.c (nto_target_ops): Update.
3115 * spu-low.c (spu_target_ops): Update.
3116 * win32-low.c (win32_target_ops): Update.
3118 2015-07-24 Yao Qi <yao.qi@linaro.org>
3120 * linux-low.c (linux_add_process): Don't set
3121 proc->priv->new_inferior.
3122 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3123 (linux_attach): Likewise.
3125 2015-07-24 Yao Qi <yao.qi@linaro.org>
3127 * server.c (start_inferior): Code refactor.
3129 2015-07-24 Yao Qi <yao.qi@linaro.org>
3131 * server.c (process_serial_event): Set general_thread.
3133 2015-07-21 Yao Qi <yao.qi@linaro.org>
3135 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3136 aarch64_linux_get_debug_reg_capacity.
3138 2015-07-17 Yao Qi <yao.qi@linaro.org>
3140 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3141 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3142 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3143 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3144 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3145 (AARCH64_HWP_ALIGNMENT): Likewise.
3146 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3147 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3148 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3149 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3150 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3151 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3152 (struct aarch64_debug_reg_state): Likewise.
3153 (struct arch_lwp_info): Likewise.
3154 (aarch64_align_watchpoint): Likewise.
3155 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3156 (aarch64_watchpoint_length): Likewise.
3157 (aarch64_point_encode_ctrl_reg): Likewise
3158 (aarch64_point_is_aligned): Likewise.
3159 (aarch64_align_watchpoint): Likewise.
3160 (aarch64_linux_set_debug_regs):
3161 (aarch64_dr_state_insert_one_point): Likewise.
3162 (aarch64_dr_state_remove_one_point): Likewise.
3163 (aarch64_handle_breakpoint): Likewise.
3164 (aarch64_handle_aligned_watchpoint): Likewise.
3165 (aarch64_handle_unaligned_watchpoint): Likewise.
3166 (aarch64_handle_watchpoint): Likewise.
3168 2015-07-17 Yao Qi <yao.qi@linaro.org>
3170 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3171 and don't aarch64_get_debug_reg_state. All callers update.
3172 (aarch64_handle_aligned_watchpoint): Likewise.
3173 (aarch64_handle_unaligned_watchpoint): Likewise.
3174 (aarch64_handle_watchpoint): Likewise.
3175 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3176 (aarch64_remove_point): Likewise.
3178 2015-07-17 Yao Qi <yao.qi@linaro.org>
3180 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3182 (aarch64_handle_unaligned_watchpoint): Likewise.
3184 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3186 Revert the previous 3 commits:
3187 Move gdb_regex* to common/
3188 Move linux_find_memory_regions_full & co.
3189 gdbserver build-id attribute generator
3191 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3192 Jan Kratochvil <jan.kratochvil@redhat.com>
3194 gdbserver build-id attribute generator.
3195 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3196 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3197 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3199 (get_dynamic): Use find_pdhr to traverse program headers.
3200 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3201 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3202 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3203 (get_hex_build_id): New.
3204 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3205 to reply XML document.
3207 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3208 Jan Kratochvil <jan.kratochvil@redhat.com>
3210 * target.c: Include target/target-utils.h and fcntl.h.
3211 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3212 (target_fileio_read_stralloc): New functions.
3214 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3216 * Makefile.in (OBS): Add gdb_regex.o.
3218 * config.in: Rebuilt.
3219 * configure: Rebuilt.
3221 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3222 Jan Kratochvil <jan.kratochvil@redhat.com>
3224 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3225 * Makefile.in (OBS): Add target-utils.o.
3226 (linux-maps.o, target-utils.o): New.
3227 * configure.srv (srv_linux_obj): Add linux-maps.o.
3229 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3231 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3233 (the_low_target): Install it.
3235 2015-07-14 Pedro Alves <palves@redhat.com>
3237 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3238 Instead, ignore ECHILD, and throw an error for other errnos.
3240 2015-07-10 Pedro Alves <palves@redhat.com>
3242 * event-loop.c (struct callback_event) <data>: Change type to
3243 gdb_client_data instance instead of gdb_client_data pointer.
3244 (append_callback_event): Adjust.
3246 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3248 * linux-aarch64-low.c: Add comments for each linux_target_ops
3249 method. Remove comments already covered in target_ops and
3250 linux_target_ops definitions.
3251 (the_low_target): Add comments for each unimplemented method.
3253 2015-07-09 Yao Qi <yao.qi@linaro.org>
3255 * linux-aarch64-low.c (aarch64_regmap): Remove.
3256 (aarch64_usrregs_info): Remove.
3257 (regs_info): Set field usrregs to NULL.
3259 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3261 * linux-low.c: Include "rsp-low.h"
3262 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3263 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3264 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3265 (handle_btrace_enable_pt): New.
3266 (handle_btrace_general_set): Support "pt".
3267 (handle_btrace_conf_general_set): Support "pt:size".
3269 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3271 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3274 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3276 * linux-aarch64-low.c: Remove comment about endianness.
3277 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3278 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3281 2015-06-24 Gary Benson <gbenson@redhat.com>
3283 * linux-i386-ipa.c (stdint.h): Do not include.
3284 * lynx-i386-low.c (stdint.h): Likewise.
3285 * lynx-ppc-low.c (stdint.h): Likewise.
3286 * mem-break.c (stdint.h): Likewise.
3287 * thread-db.c (stdint.h): Likewise.
3288 * tracepoint.c (stdint.h): Likewise.
3289 * win32-low.c (stdint.h): Likewise.
3291 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3293 * server.c (write_qxfer_response): Update call to
3294 remote_escape_output.
3296 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3297 Jan Kratochvil <jan.kratochvil@redhat.com>
3299 Merge multiple hex conversions.
3300 * gdbreplay.c (tohex): Rename to 'fromhex'.
3301 (logchar): Use fromhex.
3303 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3305 * server.c (handle_qxfer_libraries): Set `version' attribute for
3308 2015-06-10 Gary Benson <gbenson@redhat.com>
3310 * target.h (struct target_ops) <multifs_open>: New field.
3311 <multifs_unlink>: Likewise.
3312 <multifs_readlink>: Likewise.
3313 * linux-low.c (nat/linux-namespaces.h): New include.
3314 (linux_target_ops): Initialize the_target->multifs_open,
3315 the_target->multifs_unlink and the_target->multifs_readlink.
3316 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3317 * hostio.c (hostio_fs_pid): New static variable.
3318 (hostio_handle_new_gdb_connection): New function.
3319 (handle_setfs): Likewise.
3320 (handle_open): Use the_target->multifs_open as appropriate.
3321 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3322 (handle_readlink): Use the_target->multifs_readlink as
3324 (handle_vFile): Handle vFile:setfs packets.
3325 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3326 after target_handle_new_gdb_connection.
3328 2015-06-10 Gary Benson <gbenson@redhat.com>
3330 * configure.ac (AC_CHECK_FUNCS): Add setns.
3331 * config.in: Regenerate.
3332 * configure: Likewise.
3333 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3334 (linux-namespaces.o): New rule.
3335 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3337 2015-06-09 Gary Benson <gbenson@redhat.com>
3339 * hostio.c (handle_open): Process mode argument with
3340 fileio_to_host_mode.
3342 2015-06-01 Yao Qi <yao.qi@linaro.org>
3344 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3345 * linux-x86-low.c: Likewise.
3347 2015-05-28 Don Breazeal <donb@codesourcery.com>
3349 * linux-low.c (handle_extended_wait): Initialize
3350 thread_info.last_resume_kind for new fork children.
3352 2015-05-15 Pedro Alves <palves@redhat.com>
3354 * target.h (target_handle_new_gdb_connection): Rewrite using if
3355 wrapped in do/while.
3357 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3359 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3360 * configure, config.in: Regenerate.
3361 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3364 2015-05-12 Don Breazeal <donb@codesourcery.com>
3366 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3367 PTRACE_EVENT_VFORK_DONE.
3368 (linux_low_ptrace_options, extended_event_reported): Add vfork
3370 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3371 and "vforkdone" for RSP 'T' Stop Reply Packet.
3372 * server.h (report_vfork_events): Declare
3375 2015-05-12 Don Breazeal <donb@codesourcery.com>
3377 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3378 (the_low_target) <new_fork>: Initialize new member.
3379 * linux-arm-low.c (arm_new_fork): New function.
3380 (the_low_target) <new_fork>: Initialize new member.
3381 * linux-low.c (handle_extended_wait): Call new target function
3383 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3384 * linux-mips-low.c (mips_add_watchpoint): New function
3385 extracted from mips_insert_point.
3386 (the_low_target) <new_fork>: Initialize new member.
3387 (mips_linux_new_fork): New function.
3388 (mips_insert_point): Call mips_add_watchpoint.
3389 * linux-x86-low.c (x86_linux_new_fork): New function.
3390 (the_low_target) <new_fork>: Initialize new member.
3392 2015-05-12 Don Breazeal <donb@codesourcery.com>
3394 * linux-low.c (handle_extended_wait): Implement return value,
3395 rename argument 'event_child' to 'event_lwp', handle
3396 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3397 (linux_low_ptrace_options): New function.
3398 (linux_low_filter_event): Call linux_low_ptrace_options,
3399 use different argument fo linux_enable_event_reporting,
3400 use return value from handle_extended_wait.
3401 (extended_event_reported): New function.
3402 (linux_wait_1): Call extended_event_reported and set
3403 status to report fork events.
3404 (linux_write_memory): Add pid to debug message.
3405 (reset_lwp_ptrace_options_callback): New function.
3406 (linux_handle_new_gdb_connection): New function.
3407 (linux_target_ops): Initialize new structure member.
3408 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3409 * lynx-low.c: Initialize new structure member.
3410 * remote-utils.c (prepare_resume_reply): Implement stop reason
3411 "fork" for "T" stop message.
3412 * server.c (handle_query): Call handle_new_gdb_connection.
3413 * server.h (report_fork_events): Declare global flag.
3414 * target.h (struct target_ops) <handle_new_gdb_connection>:
3416 (target_handle_new_gdb_connection): New macro.
3417 * win32-low.c: Initialize new structure member.
3419 2015-05-12 Don Breazeal <donb@codesourcery.com>
3421 * mem-break.c (APPEND_TO_LIST): Define macro.
3422 (clone_agent_expr): New function.
3423 (clone_one_breakpoint): New function.
3424 (clone_all_breakpoints): New function.
3425 * mem-break.h: Declare new functions.
3427 2015-05-12 Don Breazeal <donb@codesourcery.com>
3429 * linux-low.c (linux_supports_fork_events): New function.
3430 (linux_supports_vfork_events): New function.
3431 (linux_target_ops): Initialize new structure members.
3432 (initialize_low): Call linux_check_ptrace_features.
3433 * lynx-low.c (lynx_target_ops): Initialize new structure
3435 * server.c (report_fork_events, report_vfork_events):
3437 (handle_query): Add new features to qSupported packet and
3439 (captured_main): Initialize new global variables.
3440 * target.h (struct target_ops) <supports_fork_events>:
3442 <supports_vfork_events>: New member.
3443 (target_supports_fork_events): New macro.
3444 (target_supports_vfork_events): New macro.
3445 * win32-low.c (win32_target_ops): Initialize new structure
3448 2015-05-12 Gary Benson <gbenson@redhat.com>
3450 * server.c (handle_qxfer_exec_file): Use current process
3453 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3455 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3456 Remove HAVE_PTRACE_GETREGS conditionals.
3457 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3458 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3460 2015-05-08 Yao Qi <yao.qi@linaro.org>
3462 * linux-low.c (linux_supports_conditional_breakpoints): New
3464 (linux_target_ops): Install new target method.
3465 * lynx-low.c (lynx_target_ops): Install NULL hook for
3466 supports_conditional_breakpoints.
3467 * nto-low.c (nto_target_ops): Likewise.
3468 * spu-low.c (spu_target_ops): Likewise.
3469 * win32-low.c (win32_target_ops): Likewise.
3470 * server.c (handle_query): Check
3471 target_supports_conditional_breakpoints.
3472 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3474 (target_supports_conditional_breakpoints): New macro.
3476 2015-05-06 Pedro Alves <palves@redhat.com>
3479 * server.c (start_inferior): If the process exits, mourn it.
3481 2015-04-21 Gary Benson <gbenson@redhat.com>
3483 * hostio.c (fileio_open_flags_to_host): Factored out to
3484 fileio_to_host_openflags in common/fileio.c. Single use
3487 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3489 * linux-xtensa-low.c (xtensa_fill_gregset)
3490 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3493 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3495 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3496 (regs_info): Replace usrregs pointer with NULL.
3498 2015-04-17 Gary Benson <gbenson@redhat.com>
3500 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3501 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3502 * server.c (handle_qxfer_exec_file): New function.
3503 (qxfer_packets): Add exec-file entry.
3504 (handle_query): Report qXfer:exec-file:read as supported packet.
3506 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3508 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3510 2015-04-09 Gary Benson <gbenson@redhat.com>
3512 * hostio-errno.c (errno_to_fileio_error): Remove function.
3513 Update caller to use remote_fileio_to_fio_error.
3515 2015-04-09 Yao Qi <yao.qi@linaro.org>
3517 * linux-low.c (linux_insert_point): Call
3518 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3519 (linux_remove_point): Call remove_memory_breakpoint if type is
3521 * linux-x86-low.c (x86_insert_point): Don't call
3522 insert_memory_breakpoint.
3523 (x86_remove_point): Don't call remove_memory_breakpoint.
3525 2015-04-01 Pedro Alves <palves@redhat.com>
3526 Cleber Rosa <crosa@redhat.com>
3528 * server.c (gdbserver_usage): Reorganize and extend the usage
3531 2015-03-24 Pedro Alves <palves@redhat.com>
3533 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3534 output. Also dump TRAP_TRACE.
3535 (linux_low_filter_event): In debug output, distinguish a
3536 resume_stop SIGSTOP from a delayed SIGSTOP.
3538 2015-03-24 Gary Benson <gbenson@redhat.com>
3540 * linux-x86-low.c (x86_linux_new_thread): Moved to
3542 (x86_linux_prepare_to_resume): Likewise.
3544 2015-03-24 Gary Benson <gbenson@redhat.com>
3546 * Makefile.in (x86-linux-dregs.o): New rule.
3547 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3548 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3549 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3550 (x86_linux_dr_get): Likewise.
3551 (x86_linux_dr_set): Likewise.
3552 (update_debug_registers_callback): Likewise.
3553 (x86_linux_dr_set_addr): Likewise.
3554 (x86_linux_dr_get_addr): Likewise.
3555 (x86_linux_dr_set_control): Likewise.
3556 (x86_linux_dr_get_control): Likewise.
3557 (x86_linux_dr_get_status): Likewise.
3558 (x86_linux_update_debug_registers): Likewise.
3560 2015-03-24 Gary Benson <gbenson@redhat.com>
3562 * linux-x86-low.c (x86_linux_update_debug_registers):
3563 New function, factored out from...
3564 (x86_linux_prepare_to_resume): ...this.
3566 2015-03-24 Gary Benson <gbenson@redhat.com>
3568 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3569 (x86_linux_dr_set): Likewise.
3570 (update_debug_registers_callback): Likewise.
3571 (x86_linux_dr_set_addr): Likewise.
3572 (x86_linux_dr_get_addr): Likewise.
3573 (x86_linux_dr_set_control): Likewise.
3574 (x86_linux_dr_get_control): Likewise.
3575 (x86_linux_dr_get_status): Likewise.
3576 (x86_linux_prepare_to_resume): Likewise.
3578 2015-03-24 Gary Benson <gbenson@redhat.com>
3580 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3581 Use perror_with_name. Pass string through gettext.
3582 (x86_linux_dr_set): Likewise.
3584 2015-03-24 Gary Benson <gbenson@redhat.com>
3586 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3587 (x86_linux_dr_set_addr): ...this.
3588 (x86_dr_low_get_addr): Rename to...
3589 (x86_linux_dr_get_addr): ...this.
3590 (x86_dr_low_set_control): Rename to...
3591 (x86_linux_dr_set_control): ...this.
3592 (x86_dr_low_get_control): Rename to...
3593 (x86_linux_dr_get_control): ...this.
3594 (x86_dr_low_get_status): Rename to...
3595 (x86_linux_dr_get_status): ...this.
3596 (x86_dr_low): Update with new function names.
3598 2015-03-24 Gary Benson <gbenson@redhat.com>
3600 * Makefile.in (x86-linux.o): New rule.
3601 * configure.srv: Add x86-linux.o to relevant targets.
3602 * linux-low.c (lwp_set_arch_private_info): New function.
3603 (lwp_arch_private_info): Likewise.
3604 * linux-x86-low.c: Include nat/x86-linux.h.
3605 (arch_lwp_info): Removed structure.
3606 (update_debug_registers_callback):
3607 Use lwp_set_debug_registers_changed.
3608 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3609 and lwp_set_debug_registers_changed.
3610 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3612 2015-03-24 Gary Benson <gbenson@redhat.com>
3614 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3615 * linux-arm-low.c (arm_new_thread): Likewise.
3616 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3617 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3618 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3619 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3621 2015-03-24 Gary Benson <gbenson@redhat.com>
3623 * linux-low.c (ptid_of_lwp): New function.
3624 (lwp_is_stopped): Likewise.
3625 (lwp_stop_reason): Likewise.
3626 * linux-x86-low.c (update_debug_registers_callback):
3628 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3631 2015-03-24 Gary Benson <gbenson@redhat.com>
3633 * linux-low.h (linux_stop_lwp): Remove declaration.
3635 2015-03-24 Gary Benson <gbenson@redhat.com>
3637 * linux-low.h: Include nat/linux-nat.h.
3638 * linux-low.c (iterate_over_lwps_args): New structure.
3639 (iterate_over_lwps_filter): New function.
3640 (iterate_over_lwps): Likewise.
3641 * linux-x86-low.c (update_debug_registers_callback):
3642 Update signature to what iterate_over_lwps expects.
3643 Remove PID check that iterate_over_lwps now performs.
3644 (x86_dr_low_set_addr): Use iterate_over_lwps.
3645 (x86_dr_low_set_control): Likewise.
3647 2015-03-24 Gary Benson <gbenson@redhat.com>
3649 * linux-x86-low.c (x86_debug_reg_state): New function.
3650 (x86_linux_prepare_to_resume): Use the above.
3652 2015-03-24 Gary Benson <gbenson@redhat.com>
3654 * linux-low.c (current_lwp_ptid): New function.
3655 * linux-x86-low.c: Include nat/linux-nat.h.
3656 (x86_dr_low_get_addr): Use current_lwp_ptid.
3657 (x86_dr_low_get_control): Likewise.
3658 (x86_dr_low_get_status): Likewise.
3660 2015-03-20 Pedro Alves <palves@redhat.com>
3662 * tracepoint.c (cmd_qtstatus): Make "str" const.
3664 2015-03-20 Pedro Alves <palves@redhat.com>
3666 * server.c (handle_general_set): Make "req_str" const.
3668 2015-03-19 Pedro Alves <palves@redhat.com>
3670 * linux-low.c (linux_resume_one_lwp): Rename to ...
3671 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3672 instead call perror_with_name.
3673 (check_ptrace_stopped_lwp_gone): New function.
3674 (linux_resume_one_lwp): Reimplement as wrapper around
3675 linux_resume_one_lwp_throw that swallows errors if the LWP is
3678 2015-03-19 Pedro Alves <palves@redhat.com>
3680 * linux-low.c (count_events_callback, select_event_lwp_callback):
3681 No longer check whether the thread has resume_stop as last resume
3684 2015-03-19 Pedro Alves <palves@redhat.com>
3686 * linux-low.c (count_events_callback, select_event_lwp_callback):
3687 Use the lwp's status_pending_p field, not the thread's.
3689 2015-03-19 Pedro Alves <palves@redhat.com>
3691 * linux-low.c (select_event_lwp_callback): Update comments to
3692 no longer mention SIGTRAP.
3694 2015-03-18 Gary Benson <gbenson@redhat.com>
3696 * server.c (handle_query): Do not report vFile:fstat as supported.
3698 2015-03-11 Gary Benson <gbenson@redhat.com>
3700 * hostio.c (sys/types.h): New include.
3701 (sys/stat.h): Likewise.
3702 (common-remote-fileio.h): Likewise.
3703 (handle_fstat): New function.
3704 (handle_vFile): Handle vFile:fstat packets.
3706 2015-03-11 Gary Benson <gbenson@redhat.com>
3708 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3709 struct stat.st_blocks and struct stat.st_blksize.
3710 * configure: Regenerate.
3711 * config.in: Likewise.
3712 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3713 (OBS): Add common-remote-fileio.o.
3714 (common-remote-fileio.o): New rule.
3716 2015-03-09 Pedro Alves <palves@redhat.com>
3718 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3719 'struct sockaddr' pointer in 'accept' call.
3721 2015-03-09 Pedro Alves <palves@redhat.com>
3724 2015-03-07 Pedro Alves <palves@redhat.com>
3725 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3726 or <winsock2.h> here. Instead include "gdb_socket.h".
3727 (remote_open): Use union gdb_sockaddr_u.
3728 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3729 or <winsock2.h> here. Instead include "gdb_socket.h".
3730 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3731 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3733 (init_named_socket, gdb_agent_helper_thread): Use union
3736 2015-03-07 Pedro Alves <palves@redhat.com>
3738 * configure.ac (build_warnings): Move
3739 -Wdeclaration-after-statement to the C-specific set.
3740 * configure: Regenerate.
3742 2015-03-07 Pedro Alves <palves@redhat.com>
3744 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3745 or <winsock2.h> here. Instead include "gdb_socket.h".
3746 (remote_open): Use union gdb_sockaddr_u.
3747 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3748 or <winsock2.h> here. Instead include "gdb_socket.h".
3749 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3750 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3752 (init_named_socket, gdb_agent_helper_thread): Use union
3755 2015-03-07 Pedro Alves <palves@redhat.com>
3757 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3760 2015-03-06 Yao Qi <yao.qi@linaro.org>
3762 * linux-aarch64-low.c (aarch64_insert_point): Use
3763 show_debug_regs as a boolean.
3764 (aarch64_remove_point): Likewise.
3766 2015-03-05 Pedro Alves <palves@redhat.com>
3768 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3769 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3770 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3771 * nto-low.c (nto_target_ops): Likewise.
3772 * spu-low.c (spu_target_ops): Likewise.
3773 * win32-low.c (win32_target_ops): Likewise.
3775 2015-03-04 Pedro Alves <palves@redhat.com>
3777 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3778 Decide whether a breakpoint triggered based on the SIGTRAP's
3780 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3781 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3782 (linux_low_filter_event): Check for breakpoints before checking
3784 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3786 (linux_stopped_by_sw_breakpoint)
3787 (linux_supports_stopped_by_sw_breakpoint)
3788 (linux_stopped_by_hw_breakpoint)
3789 (linux_supports_stopped_by_hw_breakpoint): New functions.
3790 (linux_target_ops): Install new target methods.
3792 2015-03-04 Pedro Alves <palves@redhat.com>
3794 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3795 * server.c (swbreak_feature, hwbreak_feature): New globals.
3796 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3797 (captured_main): Clear swbreak_feature and hwbreak_feature.
3798 * server.h (swbreak_feature, hwbreak_feature): Declare.
3799 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3800 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3801 supports_stopped_by_hw_breakpoint>: New fields.
3802 (target_supports_stopped_by_sw_breakpoint)
3803 (target_stopped_by_sw_breakpoint)
3804 (target_supports_stopped_by_hw_breakpoint)
3805 (target_stopped_by_hw_breakpoint): Declare.
3807 2015-03-04 Pedro Alves <palves@redhat.com>
3809 enum lwp_stop_reason -> enum target_stop_reason
3810 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3811 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3812 (linux_wait_1, stuck_in_jump_pad_callback)
3813 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3814 (linux_stopped_by_watchpoint):
3815 * linux-low.h (enum lwp_stop_reason): Delete.
3816 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3817 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3819 2015-03-04 Yao Qi <yao.qi@linaro.org>
3821 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3823 2015-03-03 Gary Benson <gbenson@redhat.com>
3825 * hostio.c (handle_vFile): Fix prefix lengths.
3827 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3829 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3832 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3834 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3835 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3836 (clean): Add "rm -f" for above C files.
3837 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3838 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3839 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3840 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3841 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3842 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3843 (init_registers_s390x_vx_linux64)
3844 (init_registers_s390x_tevx_linux64)
3845 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3846 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3848 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3849 (s390_store_vxrs_high): New functions.
3850 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3852 (s390_arch_setup): Add logic for selecting one of the new target
3853 descriptions. Activate the new vector regsets if applicable.
3854 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3855 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3856 and init_registers_s390x_tevx_linux64.
3858 2015-03-01 Pedro Alves <palves@redhat.com>
3860 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3863 2015-02-27 Pedro Alves <palves@redhat.com>
3865 * linux-x86-low.c (u_debugreg_offset): New function.
3866 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3868 2015-02-27 Pedro Alves <palves@redhat.com>
3870 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3871 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3872 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3873 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3874 (ps_lsetfpregs, ps_getpid)
3875 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3876 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3877 (ps_lsetxregs, ps_plog): Declare.
3879 2015-02-27 Pedro Alves <palves@redhat.com>
3881 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3882 IP_AGENT_EXPORT_FUNC.
3883 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3884 IP_AGENT_EXPORT_FUNC.
3885 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3886 (IP_AGENT_EXPORT): Delete.
3887 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3888 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3889 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3890 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3891 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3892 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3893 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3894 (traceframe_read_count, traceframe_write_count)
3895 (traceframes_created, trace_state_variables, get_raw_reg)
3896 (get_trace_state_variable_value, set_trace_state_variable_value)
3897 (ust_loaded, helper_thread_id, cmd_buf): Use
3898 IPA_SYM_EXPORTED_NAME.
3899 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3900 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3901 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3902 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3903 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3904 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3905 EXTERN_C_PUSH/EXTERN_C_POP.
3906 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3907 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3908 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3909 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3910 (traceframe_write_count, traceframe_read_count)
3911 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3912 (about_to_request_buffer_space, get_trace_state_variable_value)
3913 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3914 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3915 EXTERN_C_PUSH/EXTERN_C_POP.
3916 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3917 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3918 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3919 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3920 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3921 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3922 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3923 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3925 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3926 (IP_AGENT_EXPORT_VAR_DECL): Define.
3928 (gdb_agent_get_raw_reg): Declare.
3930 2015-02-27 Tom Tromey <tromey@redhat.com>
3931 Pedro Alves <palves@redhat.com>
3933 Rename symbols whose names are reserved C++ keywords throughout.
3935 2015-02-27 Pedro Alves <palves@redhat.com>
3937 * Makefile.in (COMPILER): New, get it from autoconf.
3938 (CXX): Get from autoconf instead.
3939 (COMPILE.pre): Use COMPILER.
3940 (CC-LD): Rename to ...
3941 (CC_LD): ... this. Use COMPILER.
3942 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3943 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3944 * acinclude.m4: Include build-with-cxx.m4.
3945 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3946 Disable -Werror by default if building in C++ mode.
3947 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3948 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3949 the C++ compiler. Save/restore CXXFLAGS too.
3950 * configure: Regenerate.
3952 2015-02-27 Pedro Alves <palves@redhat.com>
3954 * acinclude.m4: Include libiberty.m4.
3955 * configure.ac: Call libiberty_INIT.
3956 * config.in, configure: Regenerate.
3958 2015-02-26 Pedro Alves <palves@redhat.com>
3960 * linux-low.c (linux_wait_1): When incrementing the PC past a
3961 program breakpoint always use the_low_target.breakpoint_len as
3962 increment, rather than the maximum between that and
3963 the_low_target.decr_pc_after_break.
3965 2015-02-23 Pedro Alves <palves@redhat.com>
3967 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3968 thread was doing a step-over; always adjust the PC if
3969 we stepped over a permanent breakpoint.
3970 (linux_wait_1): If we stepped over breakpoint that was on top of a
3971 permanent breakpoint, manually advance the PC past it.
3973 2015-02-23 Pedro Alves <palves@redhat.com>
3975 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3977 (x86_fill_gregset, x86_store_gregset): Use it when handling
3980 2015-02-20 Pedro Alves <palves@redhat.com>
3982 * thread-db.c: Include "nat/linux-procfs.h".
3983 (thread_db_init): Skip listing new threads if the kernel supports
3984 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3986 2015-02-20 Pedro Alves <palves@redhat.com>
3988 * linux-low.c (status_pending_p_callback): Use ptid_match.
3990 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3992 PR breakpoints/16812
3993 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3994 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3995 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3997 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3999 PR breakpoints/15956
4000 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4002 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4004 * linux-low.c (linux_low_btrace_conf): Print size.
4005 * server.c (handle_btrace_conf_general_set): New.
4006 (hanle_general_set): Call handle_btrace_conf_general_set.
4007 (handle_query): Report Qbtrace-conf:bts:size as supported.
4009 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4011 * linux-low.c (linux_low_enable_btrace): Update parameters.
4012 (linux_low_btrace_conf): New.
4013 (linux_target_ops)<to_btrace_conf>: Initialize.
4014 * server.c (current_btrace_conf): New.
4015 (handle_btrace_enable): Rename to ...
4016 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4017 to target_enable_btrace. Update comment. Update users.
4018 (handle_qxfer_btrace_conf): New.
4019 (qxfer_packets): Add btrace-conf entry.
4020 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4021 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4022 (target_ops)<read_btrace_conf>: New.
4023 (target_enable_btrace): Update parameters.
4024 (target_read_btrace_conf): New.
4026 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4028 * server.c (handle_btrace_general_set): Remove call to
4029 target_supports_btrace.
4030 (supported_btrace_packets): New.
4031 (handle_query): Call supported_btrace_packets.
4032 * target.h: include btrace-common.h.
4033 (btrace_target_info): Removed.
4034 (supports_btrace, target_supports_btrace): Update parameters.
4036 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4038 * Makefile.in (SFILES): Add common/btrace-common.c.
4039 (OBS): Add common/btrace-common.o.
4040 (btrace-common.o): Add build rules.
4041 * linux-low: Include btrace-common.h.
4042 (linux_low_read_btrace): Use struct btrace_data. Call
4043 btrace_data_init and btrace_data_fini.
4045 2015-02-06 Pedro Alves <palves@redhat.com>
4047 * thread-db.c (find_new_threads_callback): Add debug output.
4049 2015-02-04 Pedro Alves <palves@redhat.com>
4051 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4052 (resume_stopped_resumed_lwps): New function.
4053 (linux_wait_for_event_filtered): Use it.
4055 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4057 * Makefile.in (SFILES): Add linux-personality.c.
4058 (linux-personality.o): New rule.
4059 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4060 list of objects to be built.
4061 * linux-low.c: Include nat/linux-personality.h.
4062 (linux_create_inferior): Remove code to disable address space
4063 randomization (moved to ../nat/linux-personality.c). Create
4064 cleanup to disable address space randomization.
4066 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4068 * Makefile.in (posix-strerror.o): New rule.
4069 (mingw-strerror.o): Likewise.
4070 * configure: Regenerated.
4071 * configure.ac: Source file ../common/common.host. Initialize new
4072 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4074 2015-01-14 Yao Qi <yao@codesourcery.com>
4076 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4077 (ppc-linux.o): New rule.
4078 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4079 * configure.ac: AC_CHECK_FUNCS(getauxval).
4080 * config.in: Re-generated.
4081 * configure: Re-generated.
4082 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4083 ppc64_64bit_inferior_p
4085 2015-01-14 Yao Qi <yao@codesourcery.com>
4087 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4088 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4089 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4090 (PT_ORIG_R3, PT_TRAP): Likewise.
4091 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4092 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4093 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4095 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4097 * i387-fp.c (i387_cache_to_xsave): In look over
4098 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4099 zmmh_low_space field by use of zmmh_high_space.
4101 2015-01-09 Pedro Alves <palves@redhat.com>
4103 * linux-low.c (step_over_bkpt): Move higher up in the file.
4104 (handle_extended_wait): Don't store the stop_pc here.
4105 (get_stop_pc): Adjust comments and rename to ...
4106 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4107 stopped for a software breakpoint or hardware breakpoint.
4108 (thread_still_has_status_pending_p): New function.
4109 (status_pending_p_callback): Use
4110 thread_still_has_status_pending_p. If the event is no longer
4111 interesting, resume the LWP.
4112 (handle_tracepoints): Add assert.
4113 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4114 (wstatus_maybe_breakpoint): New function.
4115 (cancel_breakpoint): Delete function.
4116 (check_stopped_by_watchpoint): New function, factored out from
4117 linux_low_filter_event.
4118 (lp_status_maybe_breakpoint): Delete function.
4119 (linux_low_filter_event): Remove filter_ptid argument.
4120 Leave thread group exits pending here. Store the LWP's stop PC.
4121 Always leave events pending.
4122 (linux_wait_for_event_filtered): Pull all events out of the
4123 kernel, and leave them all pending.
4124 (count_events_callback, select_event_lwp_callback): Consider all
4126 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4127 (select_event_lwp): Only give preference to the stepping LWP in
4128 all-stop mode. Adjust comments.
4129 (ignore_event): New function.
4130 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4131 references to cancel_breakpoints. Adjust to renames. Also give
4132 equal priority to all LWPs that have had events in non-stop mode.
4133 If reporting a software breakpoint event, unadjust the LWP's PC.
4134 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4135 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4137 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4138 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4139 (linux_stopped_by_watchpoint): Adjust.
4140 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4141 * linux-low.h (enum lwp_stop_reason): New.
4142 (struct lwp_info) <stop_pc>: Adjust comment.
4143 <stopped_by_watchpoint>: Delete field.
4144 <stop_reason>: New field.
4145 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4146 * mem-break.c (software_breakpoint_inserted_here)
4147 (hardware_breakpoint_inserted_here): New function.
4148 * mem-break.h (software_breakpoint_inserted_here)
4149 (hardware_breakpoint_inserted_here): Declare.
4150 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4151 (cancel_breakpoints): Delete.
4152 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4153 (upload_fast_traceframes): Remove references to
4156 2015-01-09 Pedro Alves <palves@redhat.com>
4158 * thread-db.c (find_new_threads_callback): Ignore thread if the
4159 kernel thread ID is -1.
4161 2015-01-09 Pedro Alves <palves@redhat.com>
4163 * linux-low.c (linux_attach_fail_reason_string): Move to
4164 nat/linux-ptrace.c, and rename.
4165 (linux_attach_lwp): Update comment.
4166 (attach_proc_task_lwp_callback): New function.
4167 (linux_attach): Adjust to rename and use
4168 linux_proc_attach_tgid_threads.
4169 (linux_attach_fail_reason_string): Delete declaration.
4171 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4173 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4174 * server.c (gdbserver_version): Likewise.
4176 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4178 * remote-utils.c: Include ctype.h.
4179 (input_interrupt): Explicitly handle the case when the char
4180 received is the NUL byte. Improve the printing of non-ASCII
4183 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4185 * linux-low.c (linux_low_filter_event): Update call to
4186 linux_enable_event_reporting following the addition of
4187 a new parameter to that function.
4189 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4192 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4193 (AARCH64_FPCR_REGNO): Likewise.
4194 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4195 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4196 (aarch64_store_fpregset): Likewise.
4198 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4200 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4201 Remove FIXME comment about assumption about N.
4203 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4205 * configure.ac: If large-file support is disabled in GDBserver,
4206 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4207 * configure: Regenerate.
4209 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4211 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4212 warning upon ENODATA from ptrace.
4213 * linux-s390-low.c (s390_store_tdb): New.
4214 (s390_regsets): Add regset for NT_S390_TDB.
4216 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4218 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4219 without a fill_function.
4220 * linux-s390-low.c (s390_fill_last_break): Remove.
4221 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4222 (s390_arch_setup): Use regset's size instead of fill_function for
4225 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4227 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4228 the regset's store function when ptrace returned an error.
4229 * regcache.c (get_thread_regcache): Invalidate register cache
4230 before fetching inferior's registers.
4232 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4234 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4235 while-loop as for-loop.
4236 (regsets_store_inferior_registers): Likewise.
4238 2014-11-28 Yao Qi <yao@codesourcery.com>
4240 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4241 * config.in, configure: Re-generate.
4242 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4245 2014-11-21 Yao Qi <yao@codesourcery.com>
4247 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4248 (AC_CHECK_HEADERS): Remove malloc.h.
4249 * configure: Re-generated.
4250 * config.in: Re-generated.
4251 * server.h: Don't include alloca.h and malloc.h.
4252 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4253 Don't include malloc.h.
4255 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4257 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4258 corresponding ERRNO check in same block.
4260 2014-11-12 Pedro Alves <palves@redhat.com>
4262 * server.c (cont_thread): Update comment.
4263 (start_inferior, attach_inferior): No longer clear cont_thread.
4264 (handle_v_cont): No longer set cont_thread.
4265 (captured_main): Clear cont_thread each time a GDB connects.
4267 2014-11-12 Pedro Alves <palves@redhat.com>
4269 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4270 thread, and don't resume all threads if the Hc thread has exited.
4272 2014-11-12 Pedro Alves <palves@redhat.com>
4274 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4275 the process group instead of to a specific LWP.
4277 2014-10-15 Pedro Alves <palves@redhat.com>
4280 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4282 (arm_set_thread_context): Delete.
4283 (the_low_target): Adjust.
4284 * win32-i386-low.c (debug_registers_changed)
4285 (debug_registers_used): Delete.
4286 (update_debug_registers_callback): New function.
4287 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4288 needing to update their debug registers.
4289 (win32_get_current_dr): New function.
4290 (x86_dr_low_get_addr, x86_dr_low_get_control)
4291 (x86_dr_low_get_status): Fetch the debug register from the thread
4293 (i386_initial_stuff): Adjust.
4294 (i386_get_thread_context): Remove current_event parameter. Don't
4295 clear debug_registers_changed nor copy DR values to
4297 (i386_set_thread_context): Delete.
4298 (i386_prepare_to_resume): New function.
4299 (i386_thread_added): Mark the thread as needing to update irs
4301 (the_low_target): Remove i386_set_thread_context and install
4302 i386_prepare_to_resume.
4303 * win32-low.c (win32_get_thread_context): Adjust.
4304 (win32_set_thread_context): Use SetThreadContext
4306 (win32_prepare_to_resume): New function.
4307 (win32_require_context): New function, factored out from ...
4308 (thread_rec): ... this.
4309 (continue_one_thread): Call win32_prepare_to_resume on each thread
4310 we're about to continue.
4311 (win32_resume): Call win32_prepare_to_resume on the event thread.
4312 * win32-low.h (struct win32_thread_info)
4313 <debug_registers_changed>: New field.
4314 (struct win32_target_ops): Change prototype of set_thread_context,
4315 delete set_thread_context and add prepare_to_resume.
4316 (win32_require_context): New declaration.
4318 2014-10-08 Gary Benson <gbenson@redhat.com>
4320 * server.h: Do not include common-exceptions.h.
4322 2014-10-08 Gary Benson <gbenson@redhat.com>
4324 * server.h: Do not include cleanups.h.
4326 2014-09-30 James Hogan <james.hogan@imgtec.com>
4328 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4331 2014-09-23 Yao Qi <yao@codesourcery.com>
4333 * linux-low.c (lp_status_maybe_breakpoint): New function.
4334 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4335 (count_events_callback): Likewise.
4336 (select_event_lwp_callback): Likewise.
4337 (cancel_breakpoints_callback): Likewise.
4339 2014-09-19 Don Breazeal <donb@codesourcery.com>
4341 * linux-low.c (handle_extended_wait): Call
4342 linux_ptrace_get_extended_event.
4343 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4344 linux_is_extended_waitstatus.
4346 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4348 * Makefile.in (CPPFLAGS): Define.
4349 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4350 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4352 2014-09-16 Gary Benson <gbenson@redhat.com>
4354 * inferiors.h (current_inferior): Renamed as...
4355 (current_thread): New variable. All uses updated.
4356 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4357 (maybe_move_out_of_jump_pad): Likewise.
4358 (cancel_breakpoint): Likewise.
4359 (linux_low_filter_event): Likewise.
4360 (wait_for_sigstop): Likewise.
4361 (linux_resume_one_lwp): Likewise.
4362 (need_step_over_p): Likewise.
4363 (start_step_over): Likewise.
4364 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4365 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4366 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4367 and save_inferior as saved_thread.
4368 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4370 (regcache_invalidate_thread): Likewise.
4371 * remote-utils.c (prepare_resume_reply): Likewise.
4372 * thread-db.c (thread_db_get_tls_address): Likewise.
4373 (disable_thread_event_reporting): Likewise.
4374 (remove_thread_event_breakpoints): Likewise.
4375 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4377 * target.h (set_desired_inferior): Renamed as...
4378 (set_desired_thread): New declaration. All uses updated.
4379 * server.c (myresume): Updated comment to reference thread instead
4381 (handle_serial_event): Likewise.
4382 (handle_target_event): Likewise.
4384 2014-09-12 Tom Tromey <tromey@redhat.com>
4385 Gary Benson <gbenson@redhat.com>
4387 * regcache.h: Include common-regcache.h.
4388 (regcache_read_pc): Don't declare.
4389 * regcache.c (get_thread_regcache_for_ptid): New function.
4391 2014-09-11 Tom Tromey <tromey@redhat.com>
4392 Gary Benson <gbenson@redhat.com>
4394 * symbol.c: New file.
4395 * Makefile.in (SFILES): Add symbol.c.
4396 (OBS): Add symbol.o.
4398 2014-09-11 Gary Benson <gbenson@redhat.com>
4400 * target.c (target_stop_ptid, target_continue_ptid): New
4403 2014-09-11 Tom Tromey <tromey@redhat.com>
4404 Gary Benson <gbenson@redhat.com>
4406 * target.h: Include target/target.h.
4407 * target.c (target_read_memory, target_read_uint32)
4408 (target_write_memory): New functions.
4410 2014-09-11 Gary Benson <gbenson@redhat.com>
4412 * server.h (debug_hw_points): Don't declare.
4413 * server.c (debug_hw_points): Don't define. Replace all uses
4414 with show_debug_regs.
4415 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4416 all uses with show_debug_regs.
4418 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4420 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4421 endianness into account.
4422 (ppc_supply_ptrace_register): Likewise.
4424 2014-09-03 James Hogan <james.hogan@imgtec.com>
4426 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4427 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4429 2014-09-03 Gary Benson <gbenson@redhat.com>
4431 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4432 ALL_DEBUG_ADDRESS_REGISTERS.
4434 2014-09-02 Gary Benson <gbenson@redhat.com>
4436 * i386-low.h: Renamed as...
4437 * x86-low.h: New file. All type, function and variable name
4438 prefixes changed from "i386_" to "x86_". All references updated.
4439 * i386-low.c: Renamed as...
4440 * x86-low.c: New file. All type, function and variable name
4441 prefixes changed from "i386_" to "x86_". All references updated.
4443 2014-09-02 Gary Benson <gbenson@redhat.com>
4445 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4446 (x86_linux_new_thread): Likewise.
4448 2014-08-29 Gary Benson <gbenson@redhat.com>
4450 * server.h (setjmp.h): Do not include.
4451 (toplevel): Do not declare.
4452 (common-exceptions.h): Include.
4453 (cleanups.h): Likewise.
4454 * server.c (toplevel): Do not define.
4455 (exit_code): New static global.
4456 (detach_or_kill_for_exit_cleanup): New function.
4457 (main): New function. Original main renamed to...
4458 (captured_main): New function.
4459 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4461 2014-08-29 Gary Benson <gbenson@redhat.com>
4463 * Makefile.in (SFILES): Add common/common-exceptions.c.
4464 (OBS): Add common-exceptions.o.
4465 (common-exceptions.o): New rule.
4466 * utils.c (prepare_to_throw_exception): New function.
4468 2014-08-29 Gary Benson <gbenson@redhat.com>
4470 * config.in: Regenerate.
4471 * configure: Likewise.
4473 2014-08-29 Gary Benson <gbenson@redhat.com>
4475 * Makefile.in (SFILES): Add common/cleanups.c.
4477 (cleanups.o): New rule.
4479 2014-08-29 Gary Benson <gbenson@redhat.com>
4481 * utils.c (internal_vwarning): New function.
4483 2014-08-28 Gary Benson <gbenson@redhat.com>
4485 * utils.h (fatal): Remove declaration.
4486 * utils.c (fatal): Remove function.
4488 2014-08-28 Gary Benson <gbenson@redhat.com>
4490 * tracepoint.c (gdb_agent_init): Replace fatal with
4492 (initialize_tracepoint): Likewise.
4494 2014-08-28 Gary Benson <gbenson@redhat.com>
4496 * remote-utils.c (remote_prepare): Replace fatal with error.
4498 2014-08-28 Gary Benson <gbenson@redhat.com>
4500 * linux-low.c (linux_async): Replace fatal with warning.
4502 (linux_start_non_stop): Return -1 if linux_async failed.
4504 2014-08-28 Gary Benson <gbenson@redhat.com>
4506 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4508 (i386_dr_low_get_addr): Remove vague comment.
4509 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4512 2014-08-28 Gary Benson <gbenson@redhat.com>
4514 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4515 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4517 (linux_resume_one_lwp): Likewise.
4518 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4520 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4521 with internal_error.
4522 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4523 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4524 (find_register_by_name): Replace fatal with internal_error.
4525 (find_regno): Likewise.
4526 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4527 * thread-db.c (thread_db_create_event): Likewise.
4528 (thread_db_load_search): Likewise.
4529 (try_thread_db_load_1): Likewise.
4530 * tracepoint.c (get_jump_space_head): Replace fatal with
4532 (claim_trampoline_space): Likewise.
4533 (have_fast_tracepoint_trampoline_buffer): Likewise.
4534 (cmd_qtstart): Likewise.
4535 (stop_tracing): Likewise.
4536 (fast_tracepoint_collecting): Likewise.
4537 (target_malloc): Likewise.
4538 (download_tracepoint): Likewise.
4539 (download_trace_state_variables): Replace check with gdb_assert.
4540 (upload_fast_traceframes): Replace fatal with internal_error.
4542 2014-08-19 Tom Tromey <tromey@redhat.com>
4543 Gary Benson <gbenson@redhat.com>
4545 * Makefile.in (SFILES): Add common/common-debug.c.
4546 (OBS): Add common-debug.o.
4547 (common-debug.o): New rule.
4548 * debug.h (debug_printf): Don't declare.
4549 * debug.c (debug_printf): Renamed and rewritten as...
4550 (debug_vprintf): New function.
4552 2014-08-19 Gary Benson <gbenson@redhat.com>
4554 * utils.h: Do not include print-utils.h.
4556 2014-08-19 Tom Tromey <tromey@redhat.com>
4557 Gary Benson <gbenson@redhat.com>
4559 * server.h: Add static assertion.
4560 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4562 2014-08-19 Tom Tromey <tromey@redhat.com>
4563 Gary Benson <gbenson@redhat.com>
4565 * Makefile.in (SFILES): Add common/errors.c.
4566 (OBS): Add errors.o.
4567 (IPA_OBS): Add errors-ipa.o.
4568 (errors.o): New rule.
4569 (errors-ipa.o): Likewise.
4570 * utils.h (perror_with_name, error, warning): Don't declare.
4571 * utils.c (warning): Renamed and rewritten as...
4572 (vwarning): New function.
4573 (error): Renamed and rewritten as...
4574 (verror): New function.
4575 (internal_error): Renamed and rewritten as...
4576 (internal_verror): New function.
4578 2014-08-07 Gary Benson <gbenson@redhat.com>
4580 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4581 * configure: Regenerate.
4582 * config.in: Likewise.
4583 * server.h: Do not include errno.h.
4584 * event-loop.c: Likewise.
4585 * hostio-errno.c: Likewise.
4586 * linux-low.c: Likewise.
4587 * remote-utils.c: Likewise.
4588 * spu-low.c: Likewise.
4589 * utils.c: Likewise.
4590 * gdbreplay.c: Unconditionally include errno.h.
4592 2014-08-07 Gary Benson <gbenson@redhat.com>
4594 * server.h: Do not include string.h.
4595 * event-loop.c: Likewise.
4596 * linux-low.c: Likewise.
4597 * regcache.c: Likewise.
4598 * remote-utils.c: Likewise.
4599 * spu-low.c: Likewise.
4600 * utils.c: Likewise.
4602 2014-08-07 Gary Benson <gbenson@redhat.com>
4604 * server.h: Do not include gdb_assert.h.
4606 2014-08-07 Gary Benson <gbenson@redhat.com>
4608 * server.h: Do not include common-utils.h.
4610 2014-08-07 Gary Benson <gbenson@redhat.com>
4612 * server.h: Do not include ptid.h.
4613 * notif.h: Likewise.
4615 2014-08-07 Gary Benson <gbenson@redhat.com>
4617 * server.h: Do not include gdb_locale.h.
4619 2014-08-07 Gary Benson <gbenson@redhat.com>
4621 * server.h: Do not include gdb/signals.h.
4622 * win32-low.c: Likewise.
4624 2014-08-07 Gary Benson <gbenson@redhat.com>
4626 * server.h: Do not include pathmax.h.
4628 2014-08-07 Gary Benson <gbenson@redhat.com>
4630 * server.h: Do not include libiberty.h.
4631 * linux-bfin-low.c: Likewise.
4633 2014-08-07 Gary Benson <gbenson@redhat.com>
4635 * server.h: Do not include ansidecl.h.
4637 2014-08-07 Gary Benson <gbenson@redhat.com>
4639 * linux-x86-low.c: Do not include stddef.h.
4640 * lynx-ppc-low.c: Likewise.
4641 * tracepoint.c: Likewise.
4643 2014-08-07 Gary Benson <gbenson@redhat.com>
4645 * server.h: Do not include stdarg.h.
4646 * nto-low.c: Likewise.
4648 2014-08-07 Gary Benson <gbenson@redhat.com>
4650 * server.h: Do not include stdlib.h.
4651 * inferiors.c: Likewise.
4652 * linux-low.c: Likewise.
4653 * regcache.c: Likewise.
4654 * spu-low.c: Likewise.
4655 * tracepoint.c: Likewise.
4656 * utils.c: Likewise.
4658 2014-08-07 Gary Benson <gbenson@redhat.com>
4660 * server.h: Do not include stdio.h.
4661 * linux-low.c: Likewise.
4662 * remote-utils.c: Likewise.
4663 * spu-low.c: Likewise.
4664 * utils.c: Likewise.
4665 * wincecompat.c: Likewise.
4667 2014-08-06 Gary Benson <gbenson@redhat.com>
4669 * regcache.c (init_register_cache): Move conditionals inside if.
4671 2014-08-06 Gary Benson <gbenson@redhat.com>
4673 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4675 2014-07-31 Gary Benson <gbenson@redhat.com>
4677 * ax.h: Do not include server.h.
4678 * gdbthread.h: Likewise.
4679 * lynx-low.h: Likewise.
4680 * notif.h: Likewise.
4682 2014-07-30 Gary Benson <gbenson@redhat.com>
4684 * server.h: Include common-defs.h.
4685 Do not include config.h or build-gnulib-gdbserver/config.h.
4687 2014-07-30 Gary Benson <gbenson@redhat.com>
4689 * hostio-errno.c: Move server.h to top of includes list.
4690 * inferiors.c: Likewise.
4691 * linux-x86-low.c: Likewise.
4692 * notif.c: Include server.h.
4694 2014-07-24 Tom Tromey <tromey@redhat.com>
4695 Gary Benson <gbenson@redhat.com>
4697 * server.h (CORE_ADDR): Now unsigned.
4699 2014-07-16 Pedro Alves <palves@redhat.com>
4701 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4703 2014-07-15 Pedro Alves <palves@redhat.com>
4705 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4708 2014-07-11 Pedro Alves <palves@redhat.com>
4710 * linux-low.c (kill_wait_lwp): New function, based on
4711 kill_one_lwp_callback, but use my_waitpid directly.
4712 (kill_one_lwp_callback, linux_kill): Use it.
4714 2014-06-23 Pedro Alves <palves@redhat.com>
4716 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4717 before setting DR0..DR3.
4719 2014-06-20 Gary Benson <gbenson@redhat.com>
4721 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4722 * configure: Regenerated.
4723 * config.in: Likewise.
4725 2014-06-20 Gary Benson <gbenson@redhat.com>
4727 * Makefile.in (SFILES): Update locations for files moved
4729 (object file files): Reordered.
4731 2014-06-20 Gary Benson <gbenson@redhat.com>
4733 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4734 (i386_dr_low_set_addr): Likewise.
4735 (i386_dr_low_get_addr): Likewise.
4736 (i386_dr_low_can_set_control): Likewise.
4737 (i386_dr_low_set_control): Likewise.
4738 (i386_dr_low_get_control): Likewise.
4739 (i386_dr_low_get_status): Likewise.
4740 (i386_get_debug_register_length): Likewise.
4741 * linux-x86-low.c (i386_dr_low_set_addr):
4742 Changed signature. Made static.
4743 (i386_dr_low_get_addr): Likewise.
4744 (i386_dr_low_set_control): Likewise.
4745 (i386_dr_low_get_control): Likewise.
4746 (i386_dr_low_get_status): Likewise.
4747 (i386_dr_low): New global variable.
4748 * win32-i386-low.c (i386_dr_low_set_addr):
4749 Changed signature. Made static.
4750 (i386_dr_low_get_addr): Likewise.
4751 (i386_dr_low_set_control): Likewise.
4752 (i386_dr_low_get_control): Likewise.
4753 (i386_dr_low_get_status): Likewise.
4754 (i386_dr_low): New global variable.
4756 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4758 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4759 * Makefile.in (AR, AR_FLAGS): Define.
4760 * configure: Regenerate.
4762 2014-06-19 Gary Benson <gbenson@redhat.com>
4764 * Makefile.in (i386-dregs.o): New rule.
4765 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4766 * i386-low.c (target.h): Remove include.
4767 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4768 (DR_CONTROL_SHIFT): Likewise.
4769 (DR_CONTROL_SIZE): Likewise.
4770 (DR_RW_EXECUTE): Likewise.
4771 (DR_RW_WRITE): Likewise.
4772 (DR_RW_READ): Likewise.
4773 (DR_RW_IORW): Likewise.
4774 (DR_LEN_1): Likewise.
4775 (DR_LEN_2): Likewise.
4776 (DR_LEN_4): Likewise.
4777 (DR_LEN_8): Likewise.
4778 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4779 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4780 (DR_ENABLE_SIZE): Likewise.
4781 (DR_LOCAL_SLOWDOWN): Likewise.
4782 (DR_GLOBAL_SLOWDOWN): Likewise.
4783 (DR_CONTROL_RESERVED): Likewise.
4784 (I386_DR_CONTROL_MASK): Likewise.
4785 (I386_DR_VACANT): Likewise.
4786 (I386_DR_LOCAL_ENABLE): Likewise.
4787 (I386_DR_GLOBAL_ENABLE): Likewise.
4788 (I386_DR_DISABLE): Likewise.
4789 (I386_DR_SET_RW_LEN): Likewise.
4790 (I386_DR_GET_RW_LEN): Likewise.
4791 (I386_DR_WATCH_HIT): Likewise.
4792 (i386_wp_op_t): Likewise.
4793 (i386_show_dr): Likewise.
4794 (i386_length_and_rw_bits): Likewise.
4795 (i386_insert_aligned_watchpoint): Likewise.
4796 (i386_remove_aligned_watchpoint): Likewise.
4797 (i386_handle_nonaligned_watchpoint): Likewise.
4798 i386_update_inferior_debug_regs(): Likewise.
4799 (i386_dr_insert_watchpoint): Likewise.
4800 (i386_dr_remove_watchpoint): Likewise.
4801 (i386_dr_region_ok_for_watchpoint): Likewise.
4802 (i386_dr_stopped_data_address): Likewise.
4803 (i386_dr_stopped_by_watchpoint): Likewise.
4805 2014-06-19 Gary Benson <gbenson@redhat.com>
4807 * i386-low.c (i386_dr_show): Renamed to
4808 i386_show_dr and made static. All uses updated.
4809 (i386_dr_length_and_rw_bits): Renamed to
4810 i386_length_and_rw_bits and made static.
4812 (i386_dr_insert_aligned_watchpoint): Renamed to
4813 i386_insert_aligned_watchpoint and made static.
4815 (i386_dr_remove_aligned_watchpoint): Renamed to
4816 i386_remove_aligned_watchpoint and made static.
4818 (i386_dr_update_inferior_debug_regs): Renamed to
4819 i386_update_inferior_debug_regs and made static.
4822 2014-06-18 Gary Benson <gbenson@redhat.com>
4824 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4825 (i386_dr_low_can_set_control): Likewise.
4826 (i386_get_debug_register_length): Likewise.
4827 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4828 (i386_dr_low_can_set_control): Likewise.
4829 (i386_get_debug_register_length): Likewise.
4831 2014-06-17 Gary Benson <gbenson@redhat.com>
4833 * i386-low.h (i386-dregs.h): New include.
4834 (DR_FIRSTADDR): Now in i386-dregs.h.
4835 (DR_LASTADDR): Likewise.
4836 (DR_NADDR): Likewise.
4837 (DR_STATUS): Likewise.
4838 (DR_CONTROL): Likewise.
4839 (i386_debug_reg_state): Likewise.
4840 (i386_dr_insert_watchpoint): Likewise.
4841 (i386_dr_remove_watchpoint): Likewise.
4842 (i386_dr_region_ok_for_watchpoint): Likewise.
4843 (i386_dr_stopped_data_address): Likewise.
4844 (i386_dr_stopped_by_watchpoint): Likewise.
4845 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4847 2014-06-18 Gary Benson <gbenson@redhat.com>
4849 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4850 i386_dr_insert_watchpoint.
4851 (i386_low_remove_watchpoint): Renamed to
4852 i386_dr_remove_watchpoint.
4853 (i386_low_region_ok_for_watchpoint): Renamed to
4854 i386_dr_region_ok_for_watchpoint.
4855 (i386_low_stopped_data_address): Renamed to
4856 i386_dr_stopped_data_address.
4857 (i386_low_stopped_by_watchpoint): Renamed to
4858 i386_dr_stopped_by_watchpoint.
4859 * i386-low.c (i386_show_dr): Renamed to
4860 i386_dr_show and made nonstatic. All uses updated.
4861 (i386_length_and_rw_bits): Renamed to
4862 i386_dr_length_and_rw_bits and made nonstatic.
4864 (i386_insert_aligned_watchpoint): Renamed to
4865 i386_dr_insert_aligned_watchpoint and made nonstatic.
4867 (i386_remove_aligned_watchpoint): Renamed to
4868 i386_dr_remove_aligned_watchpoint and made nonstatic.
4870 (i386_update_inferior_debug_regs): Renamed to
4871 i386_dr_update_inferior_debug_regs and made nonstatic.
4873 (i386_low_insert_watchpoint): Renamed to
4874 i386_dr_insert_watchpoint. All uses updated.
4875 (i386_low_remove_watchpoint): Renamed to
4876 i386_dr_remove_watchpoint. All uses updated.
4877 (i386_low_region_ok_for_watchpoint): Renamed to
4878 i386_dr_region_ok_for_watchpoint. All uses updated.
4879 (i386_low_stopped_data_address): Renamed to
4880 i386_dr_stopped_data_address. All uses updated.
4881 (i386_low_stopped_by_watchpoint): Renamed to
4882 i386_dr_stopped_by_watchpoint. All uses updated.
4884 2014-06-18 Gary Benson <gbenson@redhat.com>
4886 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4887 (i386_dr_low_can_set_control): Likewise.
4888 (i386_insert_aligned_watchpoint): New check.
4890 2014-06-18 Gary Benson <gbenson@redhat.com>
4892 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4895 2014-06-18 Gary Benson <gbenson@redhat.com>
4897 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4898 instead of fatal and error.
4899 (i386_handle_nonaligned_watchpoint): Likewise.
4901 2014-06-18 Gary Benson <gbenson@redhat.com>
4903 * i386-low.c (i386_get_debug_register_length): New macro.
4904 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4905 (i386_show_dr): Use debug_printf instead of fprintf. Use
4906 phex to format values.
4908 2014-06-18 Gary Benson <gbenson@redhat.com>
4910 * i386-low.h: Comment changes.
4911 * i386-low.c: Likewise.
4913 2014-06-18 Gary Benson <gbenson@redhat.com>
4915 * i386-low.c: Whitespace changes.
4917 2014-06-12 Tom Tromey <tromey@redhat.com>
4919 * utils.c (freeargv): Remove.
4921 2014-06-12 Tom Tromey <tromey@redhat.com>
4923 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4924 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4925 (parse_debug_format_options): Likewise.
4926 (gdbserver_usage): Likewise.
4927 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4928 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4929 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4931 ($(LIBGNU)): Depend on libiberty.
4932 (all-lib): Recurse into all subdirs.
4933 (install-only): Invoke "install" target in subdirs.
4934 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4936 * configure: Rebuild.
4937 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4938 for vasprintf, vsnprintf, or gettimeofday.
4939 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4942 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4944 * development.sh: Delete.
4945 * Makefile.in (config.status): Adjust dependency on development.sh.
4946 * configure.ac: Adjust development.sh source call.
4947 * configure: Regenerate.
4949 2014-06-02 Pedro Alves <palves@redhat.com>
4951 * ax.c (gdb_free_agent_expr): New function.
4952 * ax.h (gdb_free_agent_expr): New declaration.
4953 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4955 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4957 (clear_breakpoint_conditions_and_commands): New function.
4958 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4959 (clear_breakpoint_conditions_and_commands): New declaration.
4961 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4963 * linux-aarch64-low.c (asm/ptrace.h): Include.
4965 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4967 Fix TLS access for -static -pthread.
4968 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4969 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4970 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4972 2014-05-20 Pedro Alves <palves@redhat.com>
4974 * linux-aarch64-low.c (aarch64_insert_point)
4975 (aarch64_remove_point): No longer check whether the type is
4976 supported here. Adjust to new interface.
4977 (the_low_target): Install aarch64_supports_z_point_type as
4978 supports_z_point_type method.
4979 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4980 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4981 instead of a Z packet char. Adjust.
4982 (arm_supports_z_point_type): New function.
4983 (arm_insert_point, arm_remove_point): Adjust to new interface.
4984 (the_low_target): Install arm_supports_z_point_type.
4985 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4986 (cris_insert_point, cris_remove_point): Adjust to new interface.
4987 Don't check whether the type is supported here.
4988 (the_low_target): Install cris_supports_z_point_type.
4989 * linux-low.c (linux_supports_z_point_type): New function.
4990 (linux_insert_point, linux_remove_point): Adjust to new interface.
4991 * linux-low.h (struct linux_target_ops) <insert_point,
4992 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4993 raw_breakpoint pointer parameter.
4994 <supports_z_point_type>: New method.
4995 * linux-mips-low.c (mips_supports_z_point_type): New function.
4996 (mips_insert_point, mips_remove_point): Adjust to new interface.
4997 Use mips_supports_z_point_type.
4998 (the_low_target): Install mips_supports_z_point_type.
4999 * linux-ppc-low.c (the_low_target): Install NULL as
5000 supports_z_point_type method.
5001 * linux-s390-low.c (the_low_target): Install NULL as
5002 supports_z_point_type method.
5003 * linux-sparc-low.c (the_low_target): Install NULL as
5004 supports_z_point_type method.
5005 * linux-x86-low.c (x86_supports_z_point_type): New function.
5006 (x86_insert_point): Adjust to new insert_point interface. Use
5007 insert_memory_breakpoint. Adjust to new
5008 i386_low_insert_watchpoint interface.
5009 (x86_remove_point): Adjust to remove_point interface. Use
5010 remove_memory_breakpoint. Adjust to new
5011 i386_low_remove_watchpoint interface.
5012 (the_low_target): Install x86_supports_z_point_type.
5013 * lynx-low.c (lynx_target_ops): Install NULL as
5014 supports_z_point_type callback.
5015 * nto-low.c (nto_supports_z_point_type): New.
5016 (nto_insert_point, nto_remove_point): Adjust to new interface.
5017 (nto_target_ops): Install nto_supports_z_point_type.
5018 * mem-break.c: Adjust intro comment.
5019 (struct raw_breakpoint) <raw_type, size>: New fields.
5020 <inserted>: Update comment.
5021 <shlib_disabled>: Delete field.
5022 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5023 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5024 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5025 (raw_bkpt_type_to_target_hw_bp_type): New function.
5026 (find_enabled_raw_code_breakpoint_at): New function.
5027 (find_raw_breakpoint_at): New type and size parameters. Use them.
5028 (insert_memory_breakpoint): New function, based off
5029 set_raw_breakpoint_at.
5030 (remove_memory_breakpoint): New function.
5031 (set_raw_breakpoint_at): Reimplement.
5032 (set_breakpoint): New, based on set_breakpoint_at.
5033 (set_breakpoint_at): Reimplement.
5034 (delete_raw_breakpoint): Go through the_target->remove_point
5035 instead of assuming memory breakpoints.
5036 (find_gdb_breakpoint_at): Delete.
5037 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5038 (find_gdb_breakpoint): New function.
5039 (set_gdb_breakpoint_at): Delete.
5040 (z_type_supported): New function.
5041 (set_gdb_breakpoint_1): New function, loosely based off
5042 set_gdb_breakpoint_at.
5043 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5044 (delete_gdb_breakpoint_at): Delete.
5045 (delete_gdb_breakpoint_1): New function, loosely based off
5046 delete_gdb_breakpoint_at.
5047 (delete_gdb_breakpoint): New function.
5048 (clear_gdb_breakpoint_conditions): Rename to ...
5049 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5051 (add_condition_to_breakpoint): Make static.
5052 (add_breakpoint_condition): Take a struct breakpoint pointer
5053 instead of an address. Adjust.
5054 (gdb_condition_true_at_breakpoint): Rename to ...
5055 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5057 (gdb_condition_true_at_breakpoint): Reimplement.
5058 (add_breakpoint_commands): Take a struct breakpoint pointer
5059 instead of an address. Adjust.
5060 (gdb_no_commands_at_breakpoint): Rename to ...
5061 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5062 parameter. Return true if no breakpoint was found. Change debug
5064 (gdb_no_commands_at_breakpoint): Reimplement.
5065 (run_breakpoint_commands): Rename to ...
5066 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5067 and change return type to boolean.
5068 (run_breakpoint_commands): New function.
5069 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5070 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5071 breakpoint. Go through the_target->remove_point instead of
5072 assuming memory breakpoint.
5073 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5074 software and hardware breakpoints.
5075 (reinsert_raw_breakpoint): Go through the_target->insert_point
5076 instead of assuming memory breakpoint.
5077 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5078 software and hardware breakpoints.
5079 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5080 Check both software and hardware breakpoints.
5081 (validate_inserted_breakpoint): Assert the breakpoint is a
5082 software breakpoint. Set the inserted flag to -1 instead of
5083 setting shlib_disabled.
5084 (delete_disabled_breakpoints): Adjust.
5085 (validate_breakpoints): Only validate software breakpoints.
5086 Adjust to inserted flag change.
5087 (check_mem_read, check_mem_write): Skip breakpoint types other
5088 than software breakpoints. Adjust to inserted flag change.
5089 * mem-break.h (enum raw_bkpt_type): New enum.
5090 (raw_breakpoint, struct process_info): Forward declare.
5091 (Z_packet_to_target_hw_bp_type): Delete declaration.
5092 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5093 (set_gdb_breakpoint, delete_gdb_breakpoint)
5094 (clear_breakpoint_conditions): New declarations.
5095 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5096 (breakpoint_inserted_here): Update comment.
5097 (add_breakpoint_condition, add_breakpoint_commands): Replace
5098 address parameter with a breakpoint pointer parameter.
5099 (gdb_breakpoint_here): Update comment.
5100 (delete_gdb_breakpoint_at): Delete.
5101 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5102 * server.c (process_point_options): Take a struct breakpoint
5103 pointer instead of an address. Adjust.
5104 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5105 delete_gdb_breakpoint.
5106 * spu-low.c (spu_target_ops): Install NULL as
5107 supports_z_point_type method.
5108 * target.h: Include mem-break.h.
5109 (struct target_ops) <prepare_to_access_memory>: Update comment.
5110 <supports_z_point_type>: New field.
5111 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5112 instead of a char. Also take a raw breakpoint pointer.
5113 * win32-arm-low.c (the_low_target): Install NULL as
5114 supports_z_point_type.
5115 * win32-i386-low.c (i386_supports_z_point_type): New function.
5116 (i386_insert_point, i386_remove_point): Adjust to new interface.
5117 (the_low_target): Install i386_supports_z_point_type.
5118 * win32-low.c (win32_supports_z_point_type): New function.
5119 (win32_insert_point, win32_remove_point): Adjust to new interface.
5120 (win32_target_ops): Install win32_supports_z_point_type.
5121 * win32-low.h (struct win32_target_ops):
5122 <supports_z_point_type>: New method.
5123 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5124 instead of a char. Also take a raw breakpoint pointer.
5126 2014-05-20 Pedro Alves <palves@redhat.com>
5128 * mem-break.h: Include break-common.h.
5129 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5130 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5131 (Z_packet_to_target_hw_bp_type): New declaration.
5132 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5133 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5134 (Z_PACKET_ACCESS_WP): Delete macros.
5135 (Z_packet_to_hw_type): Delete function.
5136 * i386-low.h: Don't include break-common.h here.
5137 (Z_packet_to_hw_type): Delete declaration.
5138 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5139 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5140 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5141 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5142 * linux-aarch64-low.c: Don't include break-common.h here.
5143 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5144 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5145 (Z_packet_to_target_hw_bp_type): Delete function.
5146 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5148 (mips_insert_point, mips_remove_point): Use
5149 Z_packet_to_target_hw_bp_type.
5151 2014-05-20 Pedro Alves <palves@redhat.com>
5153 * linux-aarch64-low.c: Include break-common.h.
5154 (enum target_point_type): Delete.
5155 (Z_packet_to_point_type): Rename to ...
5156 (Z_packet_to_target_hw_bp_type): ... this, and return a
5157 target_hw_bp_type instead.
5158 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5159 instead of an enum target_point_type.
5160 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5162 (aarch64_dr_state_insert_one_point)
5163 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5164 (aarch64_handle_aligned_watchpoint)
5165 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5166 Take an enum target_hw_bp_type instead of an enum
5168 (aarch64_supports_z_point_type): New function.
5169 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5170 use Z_packet_to_target_hw_bp_type.
5172 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5174 * configure.ac: Only use -Werror by default when DEVELOPMENT
5176 * configure: Regenerate.
5178 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5180 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5181 * linux-x86-low.c (X86_64_USER_REGS): New.
5182 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5184 2014-04-28 Yao Qi <yao@codesourcery.com>
5186 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5189 2014-04-25 Pedro Alves <palves@redhat.com>
5192 * linux-low.c (linux_attach_fail_reason_string): New function.
5193 (linux_attach_lwp): Delete.
5194 (linux_attach_lwp_1): Rename to ...
5195 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5196 argument. Remove "initial" parameter. Return int instead of
5197 void. Don't error or warn here.
5198 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5199 failure to attach to the tgid. Call warning when failing to
5201 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5202 argument. Remove "initial" parameter. Return int instead of
5203 void. Don't error or warn here.
5204 (linux_attach_fail_reason_string): New declaration.
5205 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5206 interface change. Use linux_attach_fail_reason_string.
5208 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5209 Walfred Tedeschi <walfred.tedeschi@intel.com>
5211 * Makefile.in: Added rules to handle new files
5212 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5213 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5214 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5215 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5216 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5217 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5219 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5220 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5221 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5222 i386/x32-avx512.xml.
5223 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5224 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5225 i386/x32-avx512-linux.xml.
5226 * i387-fp.c (num_avx512_k_registers): New constant for number
5228 (num_avx512_zmmh_low_registers): New constant for number of
5229 lower ZMM registers (0-15).
5230 (num_avx512_zmmh_high_registers): New constant for number of
5231 higher ZMM registers (16-31).
5232 (num_avx512_ymmh_registers): New contant for number of higher
5233 YMM registers (ymm16-31 added by avx521 on x86_64).
5234 (num_avx512_xmm_registers): New constant for number of higher
5235 XMM registers (xmm16-31 added by AVX512 on x86_64).
5236 (struct i387_xsave): Add space for AVX512 registers.
5237 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5238 Add code to handle AVX512 registers.
5239 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5240 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5241 prototypei from generated file.
5242 (tdesc_amd64_avx512_linux): Likewise.
5243 (init_registers_x32_avx512_linux): Likewise.
5244 (tdesc_x32_avx512_linux): Likewise.
5245 (init_registers_i386_avx512_linux): Likewise.
5246 (tdesc_i386_avx512_linux): Likewise.
5247 (x86_64_regmap): Add AVX512 registers.
5248 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5250 (initialize_low_arch): Add code to initialize AVX512 registers.
5252 2014-04-23 Pedro Alves <palves@redhat.com>
5254 * mem-break.c (find_gdb_breakpoint_at): Make static.
5255 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5257 2014-04-23 Pedro Alves <palves@redhat.com>
5259 * i386-low.c: Don't include break-common.h here.
5260 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5261 prototype to take target_hw_bp_type as argument instead of a Z
5263 * i386-low.h: Include break-common.h here.
5264 (Z_packet_to_hw_type): Declare.
5265 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5267 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5268 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5269 (x86_remove_point): Convert the packet number to a
5270 target_hw_bp_type before calling i386_low_remove_watchpoint.
5271 * win32-i386-low.c (i386_insert_point): Convert the packet number
5272 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5273 (i386_remove_point): Convert the packet number to a
5274 target_hw_bp_type before calling i386_low_remove_watchpoint.
5276 2014-04-23 Pedro Alves <palves@redhat.com>
5278 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5280 2014-04-10 Pedro Alves <palves@redhat.com>
5282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5283 Check if the condition or command is NULL before checking if the
5284 breakpoint is known. On success, return true.
5285 * mem-break.h (add_breakpoint_condition): Document return.
5286 (add_breakpoint_commands): Add describing comment.
5287 * server.c (skip_to_semicolon): New function.
5288 (process_point_options): Use it.
5290 2014-04-09 Pedro Alves <palves@redhat.com>
5292 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5295 2014-02-27 Pedro Alves <palves@redhat.com>
5298 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5300 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5302 (last_thread_of_process_p): Take a PID argument instead of a
5304 (linux_wait_for_lwp): Delete.
5305 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5307 (linux_low_filter_event): New function, party factored out from
5308 linux_wait_for_event.
5309 (linux_wait_for_event): Rename to ...
5310 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5311 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5312 sigsuspend. Check for zombie leaders.
5313 (linux_wait_for_event): Reimplement as wrapper around
5314 linux_wait_for_event_filtered.
5315 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5316 a normal or signal exit is seen, it's the whole process exiting.
5317 (wait_for_sigstop): No longer a for_each_inferior callback.
5318 Rewrite on top of linux_wait_for_event_filtered.
5319 (stop_all_lwps): Call wait_for_sigstop directly.
5320 * server.c (resume, handle_target_event): Handle
5321 TARGET_WAITKIND_NO_RESUMED.
5323 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5325 * win32-low.c (psapi_get_dll_name,
5326 * win32_CreateToolhelp32Snapshot): Delete.
5327 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5328 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5330 (handle_load_dll): Add function description.
5331 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5333 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5335 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5337 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5338 base address when calling win32_add_one_solib.
5339 (handle_load_dll): Delete local variable load_addr.
5340 Remove 0x1000 offset applied to DLL base address when calling
5341 win32_add_one_solib.
5342 (handle_unload_dll): Add comment.
5344 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5346 * win32-low.c (win32_add_all_dlls): Renames
5347 win32_ensure_ntdll_loaded. Rewrite function documentation.
5348 Adjust implementation to always load all DLLs.
5349 Add 0x1000 offset to DLL base address when calling
5350 win32_add_one_solib.
5351 (child_initialization_done): New static global.
5352 (do_initial_child_stuff): Set child_initialization_done to
5353 zero during child initialization, and 1 after. Replace call
5354 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5356 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5357 (handle_unload_dll): Add function documentation.
5358 (get_child_debug_event): Ignore load and unload DLL events
5359 during child initialization.
5361 2014-02-20 Doug Evans <dje@google.com>
5363 Remove global all_lwps.
5364 * inferiors.h (ptid_of): Move here from linux-low.h.
5365 (pid_of, lwpid_of): Ditto.
5366 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5367 parameter is a struct thread_info * now.
5368 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5369 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5370 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5372 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5373 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5374 * linux-arm-low.c (update_registers_callback): Update, "entry"
5375 parameter is a struct thread_info * now.
5376 Fetch lwpid from current_inferior directly.
5377 (arm_insert_point): Pass &all_threads to find_inferior instead of
5379 (arm_remove_point): Ditto.
5380 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5381 (arm_prepare_to_resume): Fetch pid from thread.
5382 (arm_read_description): Fetch lwpid from current_inferior directly.
5383 * linux-low.c (all_lwps): Delete.
5384 (delete_lwp): Delete call to remove_inferior.
5385 (handle_extended_wait): Fetch lwpid from thread.
5386 (add_lwp): Don't set lwp->entry.id. Remove call to
5387 add_inferior_to_list.
5388 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5389 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5390 (kill_one_lwp_callback): Ditto.
5391 (linux_kill): Don't dereference NULL pointer.
5392 Fetch ptid,lwpid from thread.
5393 (get_detach_signal): Fetch ptid from thread.
5394 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5395 Simplify call to regcache_invalidate_thread.
5396 (delete_lwp_callback): Update, "entry" parameter is a
5397 struct thread_info * now. Fetch pid from thread.
5398 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5399 (status_pending_p_callback): Update, "entry" parameter is a
5400 struct thread_info * now. Fetch ptid from thread.
5401 (find_lwp_pid): Update, "entry" parameter is a
5402 struct thread_info * now.
5403 (linux_wait_for_lwp): Fetch pid from thread.
5404 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5405 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5406 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5407 (dequeue_one_deferred_signal): Ditto.
5408 (cancel_breakpoint): Fetch ptid from current_inferior.
5409 (linux_wait_for_event): Pass &all_threads to find_inferior,
5410 not &all_lwps. Fetch ptid, lwpid from thread.
5411 (count_events_callback): Update, "entry" parameter is a
5412 struct thread_info * now.
5413 (select_singlestep_lwp_callback): Ditto.
5414 (select_event_lwp_callback): Ditto.
5415 (cancel_breakpoints_callback): Ditto.
5416 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5418 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5419 (unsuspend_one_lwp): Update, "entry" parameter is a
5420 struct thread_info * now.
5421 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5423 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5424 Fetch lwpid from thread, not lwp.
5425 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5426 Pass &all_threads to find_inferior, not &all_lwps.
5427 (send_sigstop): Fetch lwpid from thread, not lwp.
5428 (send_sigstop_callback): Update, "entry" parameter is a
5429 struct thread_info * now.
5430 (suspend_and_send_sigstop_callback): Ditto.
5431 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5432 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5433 struct thread_info * now.
5434 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5436 (lwp_running): Update, "entry" parameter is a
5437 struct thread_info * now.
5438 (stop_all_lwps): Fetch ptid from thread.
5439 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5440 (linux_resume_one_lwp): Fetch lwpid from thread.
5441 (linux_set_resume_request): Update, "entry" parameter is a
5442 struct thread_info * now. Fetch pid, lwpid from thread.
5443 (resume_status_pending_p): Update, "entry" parameter is a
5444 struct thread_info * now.
5445 (need_step_over_p): Ditto. Fetch lwpid from thread.
5446 (start_step_over): Fetch lwpid from thread.
5447 (linux_resume_one_thread): Update, "entry" parameter is a
5448 struct thread_info * now. Fetch lwpid from thread.
5449 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5450 (proceed_one_lwp): Update, "entry" parameter is a
5451 struct thread_info * now. Fetch lwpid from thread.
5452 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5453 struct thread_info * now.
5454 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5455 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5456 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5458 (regsets_store_inferior_registers): Ditto.
5459 (fetch_register, store_register): Ditto.
5460 (linux_read_memory, linux_write_memory): Ditto.
5461 (linux_request_interrupt): Ditto.
5462 (linux_read_auxv): Ditto.
5463 (linux_xfer_siginfo): Ditto.
5464 (linux_qxfer_spu): Ditto.
5465 (linux_qxfer_libraries_svr4): Ditto.
5466 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5467 moved to inferiors.h.
5469 (get_thread_lwp): Update.
5470 (struct lwp_info): Delete member "entry". Simplify comment for
5473 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5474 current_inferior directly.
5475 (update_watch_registers_callback): Update, "entry" parameter is a
5476 struct thread_info * now. Fetch pid from thread.
5477 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5478 (mips_insert_point): Fetch lwpid from current_inferior.
5479 Pass &all_threads to find_inferior, not &all_lwps.
5480 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5481 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5483 (mips_stopped_data_address): Ditto.
5484 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5486 * linux-tile-low.c (tile_arch_setup): Ditto.
5487 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5488 (update_debug_registers_callback): Update, "entry" parameter is a
5489 struct thread_info * now. Fetch pid from thread.
5490 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5491 Pass &all_threads to find_inferior, not &all_lwps.
5492 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5493 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5494 Pass &all_threads to find_inferior, not &all_lwps.
5495 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5496 (i386_dr_low_get_status): Ditto.
5497 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5498 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5499 (x86_linux_read_description): Ditto.
5500 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5502 2014-02-20 Doug Evans <dje@google.com>
5504 * inferiors.c (get_first_inferior): Fix buglet.
5506 2014-02-19 Doug Evans <dje@google.com>
5508 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5509 * inferiors.c (add_thread): Change result type to struct thread_info *.
5510 All callers updated.
5511 (add_lwp): Call add_thread here instead of in callers.
5512 All callers updated.
5513 * linux-low.h (get_lwp_thread): Rewrite.
5514 (struct lwp_info): New member "thread".
5516 2014-02-19 Doug Evans <dje@google.com>
5518 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5519 All callers updated.
5521 2014-02-19 Doug Evans <dje@google.com>
5523 * inferiors.c (add_thread): Fix whitespace.
5525 2014-02-19 Doug Evans <dje@google.com>
5527 * dll.c (clear_dlls): Replace accessing list implemention details
5529 * gdbthread.h (get_first_thread): Declare.
5530 * inferiors.c (for_each_inferior_with_data): New function.
5531 (get_first_thread): New function.
5532 (find_thread_ptid): Simplify.
5533 (get_first_inferior): New function.
5534 (clear_list): Delete.
5535 (one_inferior_p): New function.
5536 (clear_inferior_list): New function.
5537 (clear_inferiors): Update.
5538 * inferiors.h (for_each_inferior_with_data): Declare.
5539 (clear_inferior_list): Declare.
5540 (one_inferior_p): Declare.
5541 (get_first_inferior): Declare.
5542 * linux-low.c (linux_wait_for_event): Replace accessing list
5543 implemention details with API function.
5544 * server.c (target_running): Ditto.
5545 (accumulate_file_name_length): New function.
5546 (emit_dll_description): New function.
5547 (handle_qxfer_libraries): Replace accessing list implemention
5548 details with API function.
5549 (handle_qxfer_threads_worker): New function.
5550 (handle_qxfer_threads_proper): Replace accessing list implemention
5551 details with API function.
5552 (handle_query): Ditto.
5553 (visit_actioned_threads_callback_ftype): New typedef.
5554 (visit_actioned_threads_data): New struct.
5555 (visit_actioned_threads): Rewrite to be find_inferior callback.
5556 (resume): Call find_inferior.
5557 (handle_status): Replace accessing list implemention
5558 details with API function.
5559 (process_serial_event): Replace accessing list implemention details
5561 * target.c (set_desired_inferior): Replace accessing list implemention
5562 details with API function.
5563 * tracepoint.c (same_process_p): New function.
5564 (gdb_agent_about_to_close): Replace accessing list implemention
5565 details with API function.
5566 * win32-low.c (child_delete_thread): Replace accessing list
5567 implemention details with API function.
5568 (match_dll_by_basename): New function.
5569 (dll_is_loaded_by_basename): New function.
5570 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5571 details call to dll_is_loaded_by_basename.
5573 2014-02-19 Doug Evans <dje@google.com>
5575 * dll.h (struct dll_info): Add comment.
5576 * gdbthread.h (struct thread_info): Add comment.
5577 (current_ptid): Simplify.
5578 * inferiors.c (add_process): Update.
5579 (remove_process): Update.
5580 * inferiors.h (struct process_info): Rename member "head" to "entry".
5581 * linux-low.c (delete_lwp): Update.
5583 (last_thread_of_process_p): Update.
5584 (kill_one_lwp_callback, linux_kill): Update.
5585 (status_pending_p_callback): Update.
5586 (wait_for_sigstop): Update. Simplify read of ptid.
5587 (start_step_over): Update.
5588 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5589 (get_lwp_thread): Update.
5590 (struct lwp_info): Rename member "head" to "entry".
5591 * regcache.h (inferior_list_entry): Delete.
5592 * server.c (kill_inferior_callback): Update.
5593 (detach_or_kill_inferior_callback): Update.
5594 (print_started_pid): Update.
5595 (print_attached_pid): Update.
5596 (process_serial_event): Simplify read of ptid.
5597 * thread-db.c (thread_db_create_event): Update.
5598 (thread_db_get_tls_address): Update.
5599 * win32-low.c (current_inferior_ptid): Simplify.
5601 2014-02-19 Tom Tromey <tromey@redhat.com>
5603 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5605 (target_supports_btrace): Update.
5607 2014-02-14 Yao Qi <yao@codesourcery.com>
5609 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5610 (rsp-low-ipa.o): New target.
5612 2014-02-12 Tom Tromey <tromey@redhat.com>
5614 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5615 convert_ascii_to_int.
5616 * regcache.c (registers_to_string): Likewise.
5617 * remote-utils.c (decode_M_packet): Likewise.
5618 * server.c (process_serial_event): Likewise.
5620 2014-02-12 Tom Tromey <tromey@redhat.com>
5622 * server.c (handle_query, handle_v_run): Use hex2bin, not
5624 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5626 2014-02-12 Tom Tromey <tromey@redhat.com>
5628 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5629 convert_int_to_ascii.
5630 * regcache.c (registers_to_string, collect_register_as_string):
5632 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5634 * server.c (process_serial_event): Likewise.
5635 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5636 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5638 2014-02-12 Tom Tromey <tromey@redhat.com>
5640 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5641 bin2hex, not hexify.
5642 * tracepoint.c (cmd_qtstatus): Likewise.
5644 2014-02-12 Tom Tromey <tromey@redhat.com>
5646 * remote-utils.c (monitor_output): Pass explicit length to
5649 2014-02-12 Tom Tromey <tromey@redhat.com>
5651 * tracepoint.c: Include rsp-low.h.
5652 * server.c: Include rsp-low.h.
5653 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5654 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5656 * remote-utils.c: Include rsp-low.h.
5657 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5658 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5659 (convert_int_to_ascii, convert_ascii_to_int): Move to
5661 * regcache.c: Include rsp-low.h.
5662 * ax.c: Include rsp-low.h.
5663 * Makefile.in (SFILES): Add common/rsp-low.c.
5664 (OBS): Add rsp-low.o.
5665 (rsp-low.o): New target.
5667 2014-02-12 Tom Tromey <tromey@redhat.com>
5669 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5670 Include print-utils.h.
5671 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5672 (plongest, thirty_two, phex_nz): Remove.
5673 * Makefile.in (SFILES): Add common/print-utils.c.
5674 (OBS): Add print-utils.o.
5675 (print-utils-ipa.o): New target.
5676 (print-utils.o): New target.
5677 (IPA_OBJS): Add print-utils-ipa.o.
5679 2014-02-06 Tom Tromey <tromey@redhat.com>
5681 * Makefile.in (SFILES): Fix indentation.
5683 2014-02-05 Doug Evans <dje@google.com>
5685 * linux-low.c (linux_wait_for_event): Improve comment.
5686 (linux_wait_1): Keep current_inferior in sync with event_child.
5688 2014-01-22 Doug Evans <dje@google.com>
5690 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5692 2014-01-22 Doug Evans <dje@google.com>
5694 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5695 * configure: Regenerate.
5696 * config.in: Regenerate.
5697 * Makefile.in (SFILES): Add debug.c.
5699 * debug.c: New file.
5700 * debug.h: New file.
5701 * linux-aarch64-low.c (*): Update all debugging printfs to use
5702 debug_printf instead of fprintf.
5703 * linux-arm-low.c (*): Ditto.
5704 * linux-cris-low.c (*): Ditto.
5705 * linux-crisv32-low.c (*): Ditto.
5706 * linux-m32r-low.c (*): Ditto.
5707 * linux-sparc-low.c (*): Ditto.
5708 * linux-x86.c (*): Ditto.
5709 * linux-low.c (*): Ditto.
5710 (linux_wait_1): Add calls to debug_enter, debug_exit.
5711 (linux_wait): Remove redundant debugging printf.
5712 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5713 (linux_resume, unstop_all_lwps): Ditto.
5714 * mem-break.c (*): Update all debugging printfs to use
5715 debug_printf instead of fprintf.
5716 * remote-utils.c (*): Ditto.
5717 * thread-db.c (*): Ditto.
5718 * server.c #include <ctype.h>, "gdb_vecs.h".
5719 (debug_threads): Moved to debug.c.
5720 (*): Update all debugging printfs to use debug_printf instead of
5722 (start_inferior): Replace call to fflush with call to debug_flush.
5723 (monitor_show_help): Mention set debug-format.
5724 (parse_debug_format_options): New function.
5725 (handle_monitor_command): Handle "monitor set debug-format".
5726 (gdbserver_usage): Mention --debug-format.
5727 (main): Parse --debug-format.
5728 * server.h (debug_threads): Declaration moved to debug.h.
5730 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5731 trace_debug_1 that uses debug_printf.
5732 (tracepoint_look_up_symbols): Update all debugging printfs to use
5733 debug_printf instead of fprintf.
5735 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5737 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5740 2014-01-17 Pedro Alves <palves@redhat.com>
5743 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5744 defined after including gdb_proc_service.h.
5746 2014-01-16 Doug Evans <dje@google.com>
5748 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5749 (match_dll): Use it.
5751 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5753 * target.h (target_ops) <read_btrace>: Change parameters and
5754 return type to allow error reporting.
5755 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5756 trace reading errors on.
5757 * linux-low.c (linux_low_read_btrace): Pass trace reading
5759 (linux_low_disable_btrace): New.
5761 2014-01-15 Doug Evans <dje@google.com>
5763 * inferiors.c (thread_id_to_gdb_id): Delete.
5764 * inferiors.h (thread_id_to_gdb_id): Delete.
5766 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5768 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5769 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5772 2014-01-08 Pedro Alves <palves@redhat.com>
5774 * server.c (handle_status): Don't discard previous queued stop
5775 replies or thread's pending status here.
5776 (main) <disconnection>: Do it here instead.
5778 2014-01-08 Pedro Alves <palves@redhat.com>
5780 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5781 * server.c (visit_actioned_threads, handle_pending_status): New
5783 (handle_v_cont): Factor out parts to ...
5784 (resume): ... this new function. If in all-stop, and a thread
5785 being resumed has a pending status, report it without actually
5787 (myresume): Adjust to use the new 'resume' function.
5788 (clear_pending_status_callback, set_pending_status_callback)
5789 (find_status_pending_thread_callback): New functions.
5790 (handle_status): Handle the case of multiple threads having
5791 interesting statuses to report. Report threads' real last signal
5792 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5793 with an interesting thread to report the status for, instead of
5794 always reporting the status of the first thread.
5796 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5798 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5799 * gdbreplay.c (gdbreplay_version): Likewise.
5801 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5803 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5804 iov.iov_len with the real length in use.
5806 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5808 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5809 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5810 for all targets that use win32-low.c.
5811 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5812 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5814 2013-12-13 Pedro Alves <palves@redhat.com>
5816 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5817 if equal to TARGET_WAITKIND_LOADED.
5818 * win32-low.c (cached_status): New static global.
5819 (win32_wait): Add declaration.
5820 (do_initial_child_stuff): Flush all initial pending debug events
5821 up to the initial breakpoint.
5822 (win32_wait): If CACHED_STATUS was set, return that instead
5823 of doing a real wait. Remove the code resuming the execution
5824 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5825 during the initial phase. Also remove the code changing
5826 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5827 TARGET_WAITKIND_STOPPED.
5829 2013-12-11 Yao Qi <yao@codesourcery.com>
5831 * notif.c (handle_notif_ack): Return 0 if no notification
5834 2013-11-20 Doug Evans <dje@google.com>
5836 * linux-low.c (linux_set_resume_request): Fix comment.
5838 2013-11-20 Doug Evans <dje@google.com>
5840 * linux-low.c (resume_status_pending_p): Tweak comment.
5842 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5844 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5845 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5846 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5847 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5848 (srv_amd64_regobj): Add amd64-mpx.o.
5849 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5850 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5851 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5852 * i387-fp.c (num_pl_bnd_register) Added constant.
5853 (num_pl_bnd_cfg_registers) Added constant.
5854 (struct i387_xsave) Added reserved area and MPX fields.
5855 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5856 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5858 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5859 (init_registers_amd64_mpx_linux): Declare new function.
5860 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5861 (x86_64_regmap): Add MPX registers.
5862 (x86_linux_read_description): Add MPX case.
5863 (initialize_low_arch): Initialize MPX targets.
5865 2013-11-18 Tom Tromey <tromey@redhat.com>
5867 * configure: Rebuild.
5868 * configure.ac: Don't check for stdlib.h.
5869 * gdbreplay.c: Unconditionally include stdlib.h.
5871 2013-11-18 Tom Tromey <tromey@redhat.com>
5873 * config.in: Rebuild.
5874 * configure: Rebuild.
5875 * configure.ac: Don't use AC_HEADER_DIRENT.
5877 2013-11-18 Tom Tromey <tromey@redhat.com>
5879 * server.h: Don't check HAVE_STRING_H.
5880 * gdbreplay.c: Don't check HAVE_STRING_H.
5881 * configure: Rebuild.
5883 2013-11-18 Tom Tromey <tromey@redhat.com>
5885 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5888 2013-11-08 Tom Tromey <tromey@redhat.com>
5890 * configure, config.in: Rebuild.
5891 * configure.ac: Remove unused configury.
5893 2013-11-08 Tom Tromey <tromey@redhat.com>
5895 * acinclude.m4: Include common.m4, codeset.m4.
5896 * configure, config.in: Rebuild.
5897 * configure.ac: Use GDB_AC_COMMON.
5899 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5901 * linux-s390-low.c (HWCAP_S390_TE): New define.
5902 (s390_arch_setup): Consider the TE field in the HWCAP for
5903 determining 'have_regset_tdb'.
5905 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5908 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5911 2013-10-02 Pedro Alves <palves@redhat.com>
5913 * server.c (process_serial_event): Don't output "GDBserver
5914 exiting" if GDB is connected through stdio.
5915 * target.c (mywait): Likewise, be silent if GDB is connected
5918 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5920 * lynx-low.c (lynx_add_threads_after_attach): New function.
5921 (lynx_attach): Remove call to add_thread. Add call to
5922 lynx_add_threads_after_attach instead.
5924 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5926 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5927 * config.in, configure: Regenerated.
5929 2013-09-18 Yao Qi <yao@codesourcery.com>
5932 * server.c (start_inferior): Clear 'resume_info'.
5934 2013-09-16 Jiong Wang <jiwang@tilera.com>
5936 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5939 2013-09-16 Jiong Wang <jiwang@tilera.com>
5941 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5942 linux-tile-low.o to srv_tgtobj.
5944 2013-09-16 Will Newton <will.newton@linaro.org>
5946 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5949 2013-09-06 Pedro Alves <palves@redhat.com>
5951 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5952 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5953 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5954 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5955 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5956 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5958 2013-09-06 Pedro Alves <palves@redhat.com>
5960 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5961 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5963 2013-09-06 Pedro Alves <palves@redhat.com>
5965 * linux-amd64-ipa.c: Include tracepoint.h.
5966 * linux-i386-ipa.c: Include tracepoint.h.
5968 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5970 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5971 (ps_get_thread_area): New function.
5973 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5975 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5976 (initialize_low_arch): Call init_registers_crisv32 rather than
5977 init_register_crisv32.
5979 2013-09-05 Pedro Alves <palves@redhat.com>
5981 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5983 * hostio.h: ... this new file.
5984 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5985 win32-low.c: Include hostio.h.
5987 2013-09-05 Pedro Alves <palves@redhat.com>
5989 * server.h (gdb_client_data, handler_func, callback_handler_func)
5990 (delete_file_handler, add_file_handler, append_callback_event)
5991 (delete_callback_event, start_event_loop, initialize_event_loop):
5992 Move to event-loop.h and include it.
5993 * event-loop.h: New file.
5995 2013-09-05 Pedro Alves <palves@redhat.com>
5997 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5998 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5999 (loaded_dll, unloaded_dll): Move to ...
6000 * dll.h: ... this new file.
6001 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6003 2013-09-05 Pedro Alves <palves@redhat.com>
6005 * server.h (current_process, get_thread_process, all_processes)
6006 (add_inferior_to_list, for_each_inferior, current_inferior)
6007 (remove_inferior, add_process, remove_process, find_process_pid)
6008 (have_started_inferiors_p, have_attached_inferiors_p)
6009 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6010 (clear_inferiors, find_inferior, find_inferior_id)
6011 (inferior_target_data, set_inferior_target_data)
6012 (inferior_regcache_data, set_inferior_regcache_data): Move to
6013 inferiors.h, and include it.
6014 * inferiors.h: New file.
6016 2013-09-05 Pedro Alves <palves@redhat.com>
6018 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6022 2013-09-05 Pedro Alves <palves@redhat.com>
6024 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6026 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6027 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6028 (handle_tracepoint_general_set, handle_tracepoint_query)
6029 (tracepoint_finished_step, tracepoint_was_hit)
6030 (release_while_stepping_state_list, current_traceframe)
6031 (in_readonly_region, traceframe_read_mem)
6032 (fetch_traceframe_registers, traceframe_read_sdata)
6033 (traceframe_read_info, struct fast_tpoint_collect_status)
6034 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6035 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6036 (supply_fast_tracepoint_registers)
6037 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6038 (ipa_tdesc, claim_trampoline_space)
6039 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6040 (agent_mem_read, agent_get_trace_state_variable_value)
6041 (agent_set_trace_state_variable_value, agent_tsv_read)
6042 (agent_mem_read_string, get_raw_reg_func_addr)
6043 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6044 * tracepoint.h: ... this new file.
6046 2013-09-05 Pedro Alves <palves@redhat.com>
6048 * server.h (perror_with_name, error, fatal, warning, paddress)
6049 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6051 * utils.h: New file.
6053 2013-09-05 Pedro Alves <palves@redhat.com>
6055 * server.h (remote_debug, noack_mode, transport_is_reliable)
6056 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6057 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6058 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6059 (write_enn, initialize_async_io, enable_async_io)
6060 (disable_async_io, check_remote_input_interrupt_request)
6061 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6062 (dead_thread_notify, prepare_resume_reply)
6063 (decode_address_to_semicolon, decode_address, decode_m_packet)
6064 (decode_M_packet, decode_X_packet, decode_xfer_write)
6065 (decode_search_memory_packet, unhexify, hexify)
6066 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6067 (look_up_one_symbol, relocate_instruction)
6068 (monitor_output): Move to remote-utils.h, and include it.
6069 * remote-utils.h: New file.
6071 2013-09-05 Pedro Alves <palves@redhat.com>
6073 * server.h (_): Delete.
6075 2013-09-02 Pedro Alves <palves@redhat.com>
6077 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6078 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6080 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6082 2013-09-02 Pierre Muller <muller@sourceware.org>
6084 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6085 or WriteProcessMemory complete successfully and handle
6086 ERROR_PARTIAL_COPY error.
6088 2013-09-02 Pedro Alves <palves@redhat.com>
6090 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6091 error instead of EIO.
6093 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6096 * linux-low.c: Include filestuff.h.
6097 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6098 * lynx-low.c: Include filestuff.h.
6099 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6100 * server.c: Include filestuff.h.
6101 (main): Call notice_open_fds.
6102 * spu-low.c: Include filestuff.h.
6103 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6105 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6107 * Makefile.in: Explain why ../target and ../nat are not
6108 listed as include file search paths.
6109 (linux-waitpid.o): New object file rule.
6110 * configure.srv (srv_native_linux_obj): New variable.
6111 Replace all occurrences of linux native object files with
6112 $srv_native_linux_obj.
6113 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6114 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6115 (linux_enable_event_reporting): Remove declaration.
6116 (my_waitpid): Moved to common/linux-waitpid.c.
6117 (linux_wait_for_event): Pass ptid when calling
6118 linux_enable_event_reporting.
6119 (linux_supports_tracefork_flag): Remove.
6120 (linux_enable_event_reporting): Likewise.
6121 (linux_tracefork_grandchild): Remove.
6122 (STACK_SIZE): Moved to common/linux-ptrace.c.
6123 (linux_tracefork_child): Remove.
6124 (linux_test_for_tracefork): Remove.
6125 (linux_look_up_symbols): Call linux_supports_traceclone.
6126 (initialize_low): Remove call to linux_test_for_tracefork.
6127 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6128 common/linux-ptrace.h.
6129 (PTRACE_TYPE_ARG4): Likewise.
6130 Include linux-ptrace.h.
6132 2013-08-21 Pedro Alves <palves@redhat.com>
6134 * config.in: Renegerate.
6136 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6138 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6139 (SFILES): Remove $(srcdir)/common/target-common.c and
6140 add $(srcdir)/target/waitstatus.c.
6141 (OBS): Remove target-common.o and add waitstatus.o.
6142 (server_h): Remove $(srcdir)/../common/target-common.h and
6143 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6144 and $(srcdir)/../target/waitstatus.h.
6145 (target-common.o): Remove.
6146 (waitstatus.o): New target object file.
6147 * target.h: Do not include target-common.h and
6148 include target/resume.h, target/wait.h and
6149 target/waitstatus.h.
6151 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6153 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6154 to PTRACE_TYPE_ARG3.
6155 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6156 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6158 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6159 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6161 2013-07-27 Jie Zhang <jie@codesourcery.com>
6162 Daniel Jacobowitz <dan@codesourcery.com>
6163 Yao Qi <yao@codesourcery.com>
6165 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6166 (mips-linux-watch.o): New rule.
6167 (mips_linux_watch_h): New variable.
6168 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6170 * linux-mips-low.c: Include mips-linux-watch.h.
6171 (struct arch_process_info, struct arch_lwp_info): New.
6172 (update_watch_registers_callback): New function.
6173 (mips_linux_new_process, mips_linux_new_thread) New functions.
6174 (mips_linux_prepare_to_resume, mips_insert_point): New
6176 (mips_remove_point, mips_stopped_by_watchpoint): New
6178 (rsp_bp_type_to_target_hw_bp_type): New function.
6179 (mips_stopped_data_address): New function.
6180 (the_low_target): Add watchpoint support functions.
6182 2013-07-27 Yao Qi <yao@codesourcery.com>
6184 * i386-low.c: Include break-common.h.
6185 (enum target_hw_bp_type): Remove.
6187 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6189 * Makefile.in (SFILES): /common/target-common.c.
6190 (OBS): Add target-common.o.
6191 (server_h): Add $(srcdir)/../common/target-common.h.
6192 (target-common.o): New target.
6193 * server.c (queue_stop_reply_callback): Free
6194 status string after use.
6195 * target.c (target_waitstatus_to_string): Remove.
6196 * target.h: Include target-common.h.
6197 (resume_kind): Likewise.
6198 (target_waitkind): Likewise.
6199 (target_waitstatus): Likewise.
6200 (TARGET_WNOHANG): Likewise.
6202 2013-07-04 Yao Qi <yao@codesourcery.com>
6204 * Makefile.in (host_alias): Use @host_noncanonical@.
6205 (target_alias): Use @target_noncanonical@.
6206 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6207 ACX_NONCANONICAL_HOST.
6208 * configure: Regenerated.
6211 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6213 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6214 * configure: Rebuild.
6215 * Makefile.in (version_host, version_target): Get from configure.
6216 (version.c): Use $(version_host) and $(version_target).
6218 2013-07-03 Pedro Alves <palves@redhat.com>
6220 * Makefile.in (config.status): Depend on development.sh.
6221 * acinclude.m4: Include libmcheck.m4.
6222 * configure: Regenerate.
6224 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6226 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6227 attribute inside the parentheses.
6228 (winapi_DebugSetProcessKillOnExit): Ditto.
6229 (winapi_DebugBreakProcess): Ditto.
6230 (winapi_GenerateConsoleCtrlEvent): Ditto.
6232 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6234 * notif.h (notif_event): Add a dummy member to avoid compiler
6237 2013-07-01 Pedro Alves <palves@redhat.com>
6239 * hostio.c (HOSTIO_PATH_MAX): Define.
6240 (require_filename, handle_open, handle_unlink, handle_readlink):
6243 2013-07-01 Pedro Alves <palves@redhat.com>
6245 * server.h: Include "pathmax.h".
6246 * linux-low.c: Don't include sys/param.h.
6247 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6249 * win32-low.c: Don't include sys/param.h.
6250 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6252 2013-07-01 Pedro Alves <palves@redhat.com>
6254 * event-loop.c: Don't check HAVE_UNISTD_H before including
6256 * gdbreplay.c: Likewise.
6257 * remote-utils.c: Likewise.
6258 * server.c: Likewise.
6259 * configure.ac: Don't check for unistd.h.
6260 * configure: Regenerate.
6262 2013-06-28 Tom Tromey <tromey@redhat.com>
6264 * Makefile.in (version.c): Use version.in, not
6267 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6269 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6270 * configure: Rebuild.
6271 * Makefile.in (version_host, version_target): Get from configure.
6272 (version.c): Use $(version_host) and $(version_target).
6274 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6276 Fix trace-status to output user name without trailing colon.
6277 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6279 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6281 Fix trace-status to output proper start-time and stop-time.
6282 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6283 output start time and stop time in hex as gdb expects.
6285 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6287 * tracepoint.c (build_traceframe_info_xml): Output trace state
6288 variables present in the trace buffer.
6290 2013-06-24 Tom Tromey <tromey@redhat.com>
6292 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6294 (version.o): Remove.
6295 * gdbreplay.c: Include version.h.
6296 (version, host_name): Don't declare.
6297 * server.h: Include version.h.
6298 (version, host_name): Don't declare.
6300 2013-06-12 Pedro Alves <palves@redhat.com>
6302 * linux-x86-low.c (linux_is_elf64): Delete global.
6303 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6304 with local linux_pid_exe_is_elf_64_file use.
6306 2013-06-11 Pedro Alves <palves@redhat.com>
6308 * linux-low.c (regset_disabled, disable_regset): New functions.
6309 (regsets_fetch_inferior_registers)
6310 (regsets_store_inferior_registers): Use them.
6311 (initialize_regsets_info); Don't allocate the disabled_regsets
6313 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6316 2013-06-11 Pedro Alves <palves@redhat.com>
6318 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6321 2013-06-11 Pedro Alves <palves@redhat.com>
6323 * linux-x86-low.c (initialize_low_arch): Call
6324 init_registers_x32_avx_linux.
6326 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6328 Fix compatibility with Android Bionic.
6329 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6332 2013-06-07 Pedro Alves <palves@redhat.com>
6335 * Makefile.in (OBS): Add tdesc.o.
6336 (IPA_OBJS): Add tdesc-ipa.o.
6337 (tdesc-ipa.o): New rule.
6338 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6340 * linux-low.c (new_inferior): Delete.
6341 (disabled_regsets, num_regsets): Delete.
6342 (linux_add_process): Adjust to set the new per-process
6344 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6345 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6346 was a stop. When calling arch_setup, switch the current inferior
6347 to the thread that got an event.
6348 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6349 (regsets_fetch_inferior_registers)
6350 (regsets_store_inferior_registers): New regsets_info parameter.
6352 (linux_register_in_regsets): New regs_info parameter. Adjust to
6354 (register_addr, fetch_register, store_register): New usrregs_info
6355 parameter. Adjust to use it.
6356 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6357 parameter regs_info. Adjust to use it.
6358 (linux_fetch_registers): Get the current inferior's regs_info, and
6360 (linux_store_registers): Ditto.
6361 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6362 (initialize_low): Don't initialize the target_regsets here. Call
6363 initialize_low_arch.
6364 * linux-low.h (target_regsets): Delete declaration.
6365 (struct regsets_info): New.
6366 (struct usrregs_info): New.
6367 (struct regs_info): New.
6368 (struct process_info_private) <new_inferior>: New field.
6369 (struct linux_target_ops): Delete the num_regs, regmap, and
6370 regset_bitmap fields. New field regs_info.
6371 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6372 * i387-fp.c (num_xmm_registers): Delete.
6373 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6374 calls to new interface.
6375 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6376 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6377 Infer the number of xmm registers from the regcache's target
6379 * i387-fp.h (num_xmm_registers): Delete.
6380 * inferiors.c (add_thread): Don't install the thread's regcache
6382 * proc-service.c (gregset_info): Fetch the current inferior's
6383 regs_info. Adjust to use it.
6384 * regcache.c: Include tdesc.h.
6385 (register_bytes, reg_defs, num_registers)
6386 (gdbserver_expedite_regs): Delete.
6387 (get_thread_regcache): If the thread doesn't have a regcache yet,
6388 create one, instead of aborting gdbserver.
6389 (regcache_invalidate_one): Rename to ...
6390 (regcache_invalidate_thread): ... this.
6391 (regcache_invalidate_one): New.
6392 (regcache_invalidate): Only invalidate registers of the current
6394 (init_register_cache): Add target_desc parameter, and use it.
6395 (new_register_cache): Ditto. Assert the target description has a
6396 non zero registers_size.
6397 (regcache_cpy): Add assertions. Adjust.
6398 (realloc_register_cache, set_register_cache): Delete.
6399 (registers_to_string, registers_from_string): Adjust.
6400 (find_register_by_name, find_regno, find_register_by_number)
6401 (register_cache_size): Add target_desc parameter, and use it.
6402 (free_register_cache_thread, free_register_cache_thread_one)
6403 (regcache_release, register_cache_size): New.
6404 (register_size): Add target_desc parameter, and use it.
6405 (register_data, supply_register, supply_register_zeroed)
6406 (supply_regblock, supply_register_by_name, collect_register)
6407 (collect_register_as_string, collect_register_by_name): Adjust.
6408 * regcache.h (struct target_desc): Forward declare.
6409 (struct regcache) <tdesc>: New field.
6410 (init_register_cache, new_register_cache): Add target_desc
6412 (regcache_invalidate_thread): Declare.
6413 (regcache_invalidate_one): Delete declaration.
6414 (regcache_release): Declare.
6415 (find_register_by_number, register_cache_size, register_size)
6416 (find_regno): Add target_desc parameter.
6417 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6419 * remote-utils.c: Include tdesc.h.
6420 (outreg, prepare_resume_reply): Adjust.
6421 * server.c: Include tdesc.h.
6422 (gdbserver_xmltarget): Delete declaration.
6423 (get_features_xml, process_serial_event): Adjust.
6424 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6426 (struct process_info) <tdesc>: New field.
6427 (ipa_tdesc): Declare.
6428 * tdesc.c: New file.
6429 * tdesc.h: New file.
6430 * tracepoint.c: Include tdesc.h.
6431 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6432 (get_context_regcache): Adjust to pass ipa_tdesc down.
6433 (do_action_at_tracepoint): Adjust to get the register cache size
6434 from the context regcache's description.
6435 (traceframe_walk_blocks): Adjust to get the register cache size
6436 from the current trace frame's description.
6437 (traceframe_get_pc): Adjust to get current trace frame's
6438 description and pass it down.
6439 (gdb_collect): Adjust to get the register cache size from the
6441 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6442 (gdbserver_xmltarget): Delete.
6443 (initialize_low_tracepoint): Set the ipa's target description.
6444 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6445 (initialize_low_tracepoint): Set the ipa's target description.
6446 * linux-x86-low.c: Include tdesc.h.
6447 [__x86_64__] (is_64bit_tdesc): New.
6448 (ps_get_thread_area, x86_get_thread_area): Use it.
6449 (i386_cannot_store_register): Rename to ...
6450 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6451 (i386_cannot_fetch_register): Rename to ...
6452 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6453 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6455 (target_regsets): Rename to ...
6456 (x86_regsets): ... this.
6457 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6459 (x86_siginfo_fixup): Use is_64bit_tdesc.
6460 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6461 (tdesc_x32_avx_linux, tdesc_x32_linux)
6462 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6464 (x86_linux_update_xmltarget): Delete.
6465 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6466 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6467 (AMD64_LINUX_USER64_CS): New.
6468 (x86_linux_read_description): New, based on
6469 x86_linux_update_xmltarget.
6470 (same_process_callback): New.
6471 (x86_arch_setup_process_callback): New.
6472 (x86_linux_update_xmltarget): New.
6473 (x86_regsets_info): New.
6474 (amd64_linux_regs_info): New.
6475 (i386_linux_usrregs_info): New.
6476 (i386_linux_regs_info): New.
6477 (x86_linux_regs_info): New.
6478 (x86_arch_setup): Reimplement.
6479 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6480 (x86_emit_ops): Ditto.
6481 (the_low_target): Adjust. Install x86_linux_regs_info,
6482 x86_cannot_fetch_register, and x86_cannot_store_register.
6483 (initialize_low_arch): New.
6484 * linux-ia64-low.c (tdesc_ia64): Declare.
6485 (ia64_fetch_register): Adjust.
6486 (ia64_usrregs_info, regs_info): New globals.
6487 (ia64_regs_info): New function.
6488 (the_low_target): Adjust.
6489 (initialize_low_arch): New function.
6490 * linux-sparc-low.c (tdesc_sparc64): Declare.
6491 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6493 (sparc_arch_setup): New function.
6494 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6495 (the_low_target): Adjust.
6496 (initialize_low_arch): New function.
6497 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6498 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6499 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6500 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6501 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6502 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6503 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6504 (tdesc_powerpc_isa205_vsx64l): Declare.
6505 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6506 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6507 (ppc_set_pc, ppc_get_hwcap): Adjust.
6508 (ppc_usrregs_info): Forward declare.
6509 (!__powerpc64__) ppc_regmap_adjusted: New global.
6510 (ppc_arch_setup): Adjust to the current process'es target
6512 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6513 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6514 (ppc_store_evrregset): Adjust.
6515 (target_regsets): Rename to ...
6516 (ppc_regsets): ... this, and make static.
6517 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6518 (ppc_regs_info): New function.
6519 (the_low_target): Adjust.
6520 (initialize_low_arch): New function.
6521 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6522 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6523 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6524 (tdesc_s390x_linux64v2): Declare.
6525 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6526 (s390_fill_gregset, s390_store_last_break): Adjust.
6527 (target_regsets): Rename to ...
6528 (s390_regsets): ... this, and make static.
6529 (s390_get_pc, s390_set_pc): Adjust.
6530 (s390_get_hwcap): New target_desc parameter, and use it.
6531 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6532 (s390_arch_setup): Adjust to set the current process'es target
6533 description. Don't adjust the regmap.
6534 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6535 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6536 (regs_info_3264): New globals.
6537 (s390_regs_info): New function.
6538 (the_low_target): Adjust.
6539 (initialize_low_arch): New function.
6540 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6541 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6542 [__mips64] (init_registers_mips_linux)
6543 (init_registers_mips_dsp_linux): Delete defines.
6544 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6545 (have_dsp): New global.
6546 (mips_read_description): New, based on mips_arch_setup.
6547 (mips_arch_setup): Reimplement.
6548 (get_usrregs_info): New function.
6549 (mips_cannot_fetch_register, mips_cannot_store_register)
6550 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6551 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6552 (target_regsets): Rename to ...
6553 (mips_regsets): ... this, and make static.
6554 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6555 (dsp_regs_info, regs_info): New globals.
6556 (mips_regs_info): New function.
6557 (the_low_target): Adjust.
6558 (initialize_low_arch): New function.
6559 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6560 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6562 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6563 (arm_read_description): New, with bits factored from
6565 (arm_arch_setup): Reimplement.
6566 (target_regsets): Rename to ...
6567 (arm_regsets): ... this, and make static.
6568 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6569 (arm_regs_info): New function.
6570 (the_low_target): Adjust.
6571 (initialize_low_arch): New function.
6572 * linux-m68k-low.c (tdesc_m68k): Declare.
6573 (target_regsets): Rename to ...
6574 (m68k_regsets): ... this, and make static.
6575 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6576 (m68k_regs_info): New function.
6577 (m68k_arch_setup): New function.
6578 (the_low_target): Adjust.
6579 (initialize_low_arch): New function.
6580 * linux-sh-low.c (tdesc_sharch): Declare.
6581 (target_regsets): Rename to ...
6582 (sh_regsets): ... this, and make static.
6583 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6584 (sh_regs_info, sh_arch_setup): New functions.
6585 (the_low_target): Adjust.
6586 (initialize_low_arch): New function.
6587 * linux-bfin-low.c (tdesc_bfin): Declare.
6588 (bfin_arch_setup): New function.
6589 (bfin_usrregs_info, regs_info): New globals.
6590 (bfin_regs_info): New function.
6591 (the_low_target): Adjust.
6592 (initialize_low_arch): New function.
6593 * linux-cris-low.c (tdesc_cris): Declare.
6594 (cris_arch_setup): New function.
6595 (cris_usrregs_info, regs_info): New globals.
6596 (cris_regs_info): New function.
6597 (the_low_target): Adjust.
6598 (initialize_low_arch): New function.
6599 * linux-cris-low.c (tdesc_crisv32): Declare.
6600 (cris_arch_setup): New function.
6601 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6602 (cris_regs_info): New function.
6603 (the_low_target): Adjust.
6604 (initialize_low_arch): New function.
6605 * linux-m32r-low.c (tdesc_m32r): Declare.
6606 (m32r_arch_setup): New function.
6607 (m32r_usrregs_info, regs_info): New globals.
6608 (m32r_regs_info): Adjust.
6609 (initialize_low_arch): New function.
6610 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6611 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6612 (tic6x_usrregs_info): Forward declare.
6613 (tic6x_read_description): New function, based on ...
6614 (tic6x_arch_setup): ... this. Reimplement.
6615 (target_regsets): Rename to ...
6616 (tic6x_regsets): ... this, and make static.
6617 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6618 (tic6x_regs_info): New function.
6619 (the_low_target): Adjust.
6620 (initialize_low_arch): New function.
6621 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6622 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6623 (target_regsets): Rename to ...
6624 (xtensa_regsets): ... this, and make static.
6625 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6627 (xtensa_arch_setup, xtensa_regs_info): New functions.
6628 (the_low_target): Adjust.
6629 (initialize_low_arch): New function.
6630 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6631 (nios2_arch_setup): Set the current process'es tdesc.
6632 (target_regsets): Rename to ...
6633 (nios2_regsets): ... this.
6634 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6635 (nios2_regs_info): New function.
6636 (the_low_target): Adjust.
6637 (initialize_low_arch): New function.
6638 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6639 (aarch64_arch_setup): Set the current process'es tdesc.
6640 (target_regsets): Rename to ...
6641 (aarch64_regsets): ... this.
6642 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6643 (aarch64_regs_info): New function.
6644 (the_low_target): Adjust.
6645 (initialize_low_arch): New function.
6646 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6648 (target_regsets): Rename to ...
6649 (tile_regsets): ... this.
6650 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6651 (tile_regs_info): New function.
6652 (tile_arch_setup): Set the current process'es tdesc.
6653 (the_low_target): Adjust.
6654 (initialize_low_arch): New function.
6655 * spu-low.c (tdesc_spu): Declare.
6656 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6657 * win32-arm-low.c (tdesc_arm): Declare.
6658 (arm_arch_setup): New function.
6659 (the_low_target): Install arm_arch_setup instead of
6661 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6662 (init_windows_x86): Rename to ...
6663 (i386_arch_setup): ... this. Set `win32_tdesc'.
6664 (the_low_target): Adjust.
6665 * win32-low.c (win32_tdesc): New global.
6666 (child_add_thread): Don't create the thread cache here.
6667 (do_initial_child_stuff): Set the new process'es tdesc.
6668 * win32-low.h (struct target_desc): Forward declare.
6669 (win32_tdesc): Declare.
6670 * lynx-i386-low.c (tdesc_i386): Declare global.
6671 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6672 * lynx-low.c (lynx_tdesc): New global.
6673 (lynx_add_process): Set the new process'es tdesc.
6674 * lynx-low.h (struct target_desc): Forward declare.
6675 (lynx_tdesc): Declare global.
6676 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6677 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6678 * nto-low.c (nto_tdesc): New global.
6679 (do_attach): Set the new process'es tdesc.
6680 * nto-low.h (struct target_desc): Forward declare.
6681 (nto_tdesc): Declare.
6682 * nto-x86-low.c (tdesc_i386): Declare.
6683 (nto_x86_arch_setup): Set `nto_tdesc'.
6685 2013-06-04 Gary Benson <gbenson@redhat.com>
6687 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6688 to qSupported response when appropriate.
6689 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6690 with nonzero-length annex.
6691 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6692 arguments supplied in annex.
6694 2013-05-31 Doug Evans <dje@google.com>
6697 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6698 64 bits in 64-cross-32 environment.
6700 2013-05-28 Pedro Alves <palves@redhat.com>
6702 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6703 (aarch64-without-fpu.c): Delete rule.
6704 * configure.srv (aarch64*-*-linux*): Remove references to
6705 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6706 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6709 2013-05-24 Pedro Alves <palves@redhat.com>
6711 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6712 instead of strchr/decode_address. Error if the range isn't split
6713 with a ','. Don't assume there's be a ':' in the action.
6715 2013-05-23 Yao Qi <yao@codesourcery.com>
6716 Pedro Alves <palves@redhat.com>
6718 * linux-low.c (lwp_in_step_range): New function.
6719 (linux_wait_1): If the thread was range stepping and stopped
6720 outside the stepping range, report the stop to GDB. Otherwise,
6721 continue stepping. Add range stepping debug output.
6722 (linux_set_resume_request): Copy the step range from the resume
6724 (linux_supports_range_stepping): New.
6725 (linux_target_ops) <supports_range_stepping>: Set to
6726 linux_supports_range_stepping.
6727 * linux-low.h (struct linux_target_ops)
6728 <supports_range_stepping>: New field.
6729 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6730 * linux-x86-low.c (x86_supports_range_stepping): New.
6731 (the_low_target) <supports_range_stepping>: Set to
6732 x86_supports_range_stepping.
6733 * server.c (handle_v_cont): Handle 'r' action.
6734 (handle_v_requests): Append ";r" if the target supports range
6736 * target.h (struct thread_resume) <step_range_start,
6737 step_range_end>: New fields.
6738 (struct target_ops) <supports_range_stepping>:
6740 (target_supports_range_stepping): New macro.
6742 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6744 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6745 confusion in comment.
6747 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6749 * lynx-low.c (struct process_info_private): New type.
6750 (lynx_add_process): New function.
6751 (lynx_create_inferior, lynx_attach): Replace calls to
6752 add_process by calls to lynx_add_process.
6753 (lynx_resume): If PTID is null, then try using
6754 current_process()->private->last_wait_event_ptid.
6756 (lynx_clear_inferiors): Delete. The contents of that function
6757 has been inlined in lynx_mourn;
6758 (lynx_wait_1): Save the ptid in the process's private data.
6759 (lynx_mourn): Free the process' private data. Replace call
6760 to lynx_clear_inferiors by call to clear_inferiors.
6762 2013-05-17 Yao Qi <yao@codesourcery.com>
6764 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6767 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6769 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6770 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6771 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6772 PT_TEXT_END_ADDR guards. Update comments.
6773 (linux_target_op) <read_offsets>: Conditionally define to
6774 linux_read_offsets if the target is UCLIBC and if it defines
6775 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6777 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6778 Andrew Jenner <andrew@codesourcery.com>
6780 * Makefile.in (SFILES): Add linux-nios2-low.c.
6781 (clean): Add action to delete nios2-linux.c.
6782 (nios2-linux.c): New rule.
6783 * configure.srv: Add nios2*-*-linux*.
6784 * linux-nios2-low.c: New.
6786 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6788 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6790 2013-04-25 Hui Zhu <hui@codesourcery.com>
6793 * ax.c (ax_printf): Add fflush.
6795 2013-04-22 Tom Tromey <tromey@redhat.com>
6797 * Makefile.in (SFILES): Add filestuff.c.
6798 (OBS): Add filestuff.o.
6799 (filestuff.o): New target.
6800 * config.in, configure: Rebuild.
6801 * configure.ac: Check for fdwalk, pipe2.
6803 2013-04-17 Pedro Alves <palves@redhat.com>
6805 * configure.ac (USE_THREAD_DB): Delete variable.
6806 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6807 Don't AC_SUBST USE_THREAD_DB.
6808 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6809 * config.in, configure: Regenerate.
6811 2013-04-16 Pedro Alves <palves@redhat.com>
6813 * linux-low.h (struct lwp_info) <thread_known>: Move under
6814 the USE_THREAD_DB #ifdef.
6816 2013-04-16 Pedro Alves <palves@redhat.com>
6818 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6819 (linux-low.o): Delete rule.
6820 * linux-low.h: Always include "gdb_thread_db.h" instead of
6821 conditionally including thread_db.h.
6822 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6825 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6827 * Makefile.in (install-only): Fix make install regression.
6829 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6831 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6832 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6834 * gdbserver.1: Remove.
6836 2013-03-22 Pedro Alves <palves@redhat.com>
6838 * linux-low.c (handle_extended_wait): Don't call
6839 linux_enable_event_reporting.
6841 2013-03-15 Tony Theodore <tonyt@logyst.com>
6844 * Makefile.in (SHELL): Use @SHELL@.
6846 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6848 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6851 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6853 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6854 Remove extraneous NULL element.
6856 2013-03-13 Yao Qi <yao@codesourcery.com>
6858 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6859 'V' block in trace frame.
6861 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6863 * target.h (struct target_ops): Add btrace ops.
6864 (target_supports_btrace): New macro.
6865 (target_enable_btrace): New macro.
6866 (target_disable_btrace): New macro.
6867 (target_read_btrace): New macro.
6868 * gdbthread.h (struct thread_info): Add btrace field.
6869 * server.c: Include btrace-common.h.
6870 (handle_btrace_general_set): New function.
6871 (handle_btrace_enable): New function.
6872 (handle_btrace_disable): New function.
6873 (handle_general_set): Call handle_btrace_general_set.
6874 (handle_qxfer_btrace): New function.
6875 (struct qxfer qxfer_packets[]): Add btrace entry.
6876 * inferiors.c (remove_thread): Disable btrace.
6877 * linux-low: Include linux-btrace.h.
6878 (linux_low_enable_btrace): New function.
6879 (linux_low_read_btrace): New function.
6880 (linux_target_ops): Add btrace ops.
6881 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6882 Add srv_linux_btrace=yes.
6883 (x86_64-*-linux*): Add linux-btrace.o.
6884 Add srv_linux_btrace=yes.
6885 * configure.ac: Define HAVE_LINUX_BTRACE.
6886 * config.in: Regenerated.
6887 * configure: Regenerated.
6889 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6891 * server.c (handle_qxfer): Preserve error message if -3 is
6893 (qxfer): Document the -3 return value.
6895 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6897 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6898 (linux_btrace_h): New variable.
6899 (linux-btrace.o): New rule.
6901 2013-03-08 Stan Shebs <stan@codesourcery.com>
6902 Hafiz Abid Qadeer <abidh@codesourcery.com>
6904 * tracepoint.c (trace_buffer_size): New global.
6905 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6906 (init_trace_buffer): Change to one-argument function. Allocate
6907 trace buffer memory.
6908 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6909 handle QTBuffer:size packet.
6910 (cmd_bigqtbuffer_size): New function.
6911 (initialize_tracepoint): Call init_trace_buffer with
6912 DEFAULT_TRACE_BUFFER_SIZE.
6913 * server.c (handle_query): Add QTBuffer:size in the
6916 2013-03-07 Yao Qi <yao@codesourcery.com>
6918 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6919 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6921 (cmd_qtsp): Adjust condition. Do post increment.
6922 Set cur_action and cur_step_action back to 0.
6924 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6927 * linux-low.c (linux_write_memory): Return early success if LEN is
6930 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6932 * configure.srv: Add x86_64-*-cygwin* as target.
6934 2013-02-28 Tom Tromey <tromey@redhat.com>
6936 * configure.ac: Invoke AC_SYS_LARGEFILE.
6937 * configure, config.in: Rebuild.
6939 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6941 * win32-low.c: Throughout, fix format strings and casts of
6942 printf-like functions to avoid type related warnings on all
6944 (get_child_debug_event): Print dwDebugEventCode as hex since
6945 that's how it's usually documented.
6947 2013-02-28 Yao Qi <yao@codesourcery.com>
6949 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6952 2013-02-27 Jiong Wang <jiwang@tilera.com>
6954 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6955 (reg-tilegx32.c): New rule.
6956 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6957 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6958 different register info initializer according to elf class.
6959 (init_registers_tilgx32): New function. The tilegx32 register info
6961 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6962 (tile_store_gregset): Likewise.
6964 2013-02-27 Yao Qi <yao@codesourcery.com>
6966 * server.c (process_point_options): Print debug message when
6967 debug_threads is true.
6969 2013-02-26 Yao Qi <yao@codesourcery.com>
6971 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6973 2013-02-19 Pedro Alves <palves@redhat.com>
6974 Kai Tietz <ktietz@redhat.com>
6978 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6979 instead of strtoul to extract address from packet.
6980 (process_serial_event) <'z'>: Likewise.
6982 2013-02-18 Yao Qi <yao@codesourcery.com>
6984 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6986 2013-02-14 Pedro Alves <palves@redhat.com>
6990 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6991 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6993 2013-02-14 Pedro Alves <palves@redhat.com>
6995 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6997 2013-02-14 Pedro Alves <palves@redhat.com>
6999 * tracepoint.c (save_string): Delete.
7000 (add_tracepoint_action): Use savestring instead of save_string.
7002 2013-02-12 Pedro Alves <palves@redhat.com>
7004 * linux-xtensa-low.c: Ditto.
7005 * xtensa-xtregs.c: Ditto.
7007 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7009 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7012 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7014 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7015 aarch64_num_wp_regs and aarch64_num_bp_regs to
7016 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7018 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7020 * linux-aarch64-low.c (ps_get_thread_area): Replace
7021 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7023 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7024 Marcus Shawcroft <marcus.shawcroft@arm.com>
7025 Nigel Stephens <nigel.stephens@arm.com>
7026 Yufeng Zhang <yufeng.zhang@arm.com>
7028 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7029 (aarch64.c, aarch64-without-fpu.c): New targets.
7030 * configure.srv (aarch64*-*-linux*): New.
7031 * linux-aarch64-low.c: New file.
7033 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7035 * linux-low.c (handle_extended_wait, linux_create_inferior)
7036 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7037 (dequeue_one_deferred_signal, linux_resume_one_thread)
7038 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7039 (linux_tracefork_grandchild, linux_test_for_tracefork)
7040 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7041 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7042 where the argument is 0.
7044 2013-01-25 Yao Qi <yao@codesourcery.com>
7046 * event-loop.c: Include "queue.h".
7047 (gdb_event_p): New typedef.
7048 (struct gdb_event) <next_event>: Remove.
7049 (event_queue): Change to QUEUE(gdb_event_p).
7050 (async_queue_event): Remove.
7051 (gdb_event_xfree): New.
7052 (initialize_event_loop): New.
7053 (process_event): Use API from QUEUE.
7054 (wait_for_event): Likewise.
7055 * server.c (main): Call initialize_event_loop.
7056 * server.h (initialize_event_loop): Declare.
7058 2013-01-18 Yao Qi <yao@codesourcery.com>
7060 * ax.h (struct eval_agent_expr_context): New.
7061 (gdb_eval_agent_expr): Update declaration.
7062 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7063 TFRAME. Add new argument CTX.
7064 * server.h (struct eval_agent_expr_context): Declare.
7065 (agent_mem_read, agent_tsv_read): Update declaration.
7066 (agent_mem_read_string): Likewise.
7067 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7068 (add_traceframe_block): Add new argument TPOINT.
7069 Increase TPOINT->traceframe_usage.
7070 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7071 eval_tracepoint_agent_expr.
7072 (condition_true_at_tracepoint): Likewise.
7073 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7074 (agent_mem_read_string, agent_tsv_read): Likewise.
7076 2013-01-16 Yao Qi <yao@codesourcery.com>
7078 * linux-low.c (linux_resume_one_lwp): Don't check
7079 'lwp->bp_reinsert != 0'.
7081 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7082 Pedro Alves <palves@redhat.com>
7084 * lynx-low.c (ptrace_request_to_str): Define a temporary
7085 macro and use it to simplify this function's implementation.
7087 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7089 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7092 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7094 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7096 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7098 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7100 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7102 * lynx-low.c (lynx_resume): Use the resume_info parameter
7103 to determine the ptid for the lynx_ptrace call, unless
7104 it is equal to minus_one_ptid, in which case we use the
7105 ptid of the current_inferior.
7106 (lynx_wait_1): After having received a thread create/exit
7107 event, resume the inferior's execution using the signaling
7108 thread's ptid, rather than the old ptid.
7110 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7112 * lynx-low.c (lynx_resume): Delete variable ret.
7114 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7116 * gdbreplay.c (gdbreplay_version): Update copyright year.
7117 * server.c (gdbserver_version): Likewise.
7119 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7121 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7124 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7126 * lynx-low.c (ptrace_request_to_str): Add handling for
7129 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7131 * lynx-low.c (lynx_attach): Delete variable new_process.
7133 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7135 * lynx-low.c (lynx_create_inferior): Delete variable
7138 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7140 * lynx-low.c (ptrace_request_to_str): Do not handle
7141 PTRACE_GETTHREADLIST if this macro does not exist.
7143 2012-12-15 Yao Qi <yao@codesourcery.com>
7145 * Makefile.in (OBS): Add notif.o.
7146 * notif.c, notif.h: New.
7147 * server.c: Include "notif.h".
7148 (struct vstop_notif) <next>: Remove.
7150 (queue_stop_reply): Update.
7151 (push_event, send_next_stop_reply): Remove.
7152 (discard_queued_stop_replies): Update.
7153 (notif_stop): New variable.
7154 (handle_v_stopped): Remove.
7155 (handle_v_requests): Don't call handle_v_stopped. Call
7156 handle_ack_notif instead.
7157 (queue_stop_reply_callback): Call notif_event_enque instead
7158 of queue_stop_reply.
7159 (handle_status): Don't call send_next_stop_reply, call
7160 notif_write_event instead.
7161 (kill_inferior_callback): Likewise.
7162 (detach_or_kill_inferior_callback): Likewise.
7163 (main): Call initialize_notif.
7164 (process_serial_event): Call QUEUE_is_empty.
7165 (handle_target_event): Call notif_push instead of push event.
7166 * server.h (push_event): Remove declaration.
7168 2012-12-10 Tom Tromey <tromey@redhat.com>
7170 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7171 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7174 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7175 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7176 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7177 (amd64-linux-ipa.o, ax.o): Rewrite.
7178 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7179 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7180 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7181 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7182 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7183 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7184 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7185 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7186 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7187 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7188 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7189 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7190 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7191 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7192 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7193 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7194 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7195 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7196 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7197 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7198 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7199 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7200 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7201 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7202 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7203 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7204 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7205 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7206 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7207 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7208 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7209 (reg-tilegx.o): Remove.
7210 (all_object_files): New macro.
7211 Include .deps files.
7212 * aclocal.m4, configure: Rebuild.
7213 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7214 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7215 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7217 2012-12-05 Tom Tromey <tromey@redhat.com>
7220 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7222 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7224 * configure.ac: Check for linux/perf_event.h.
7225 * config.in: Regenerated.
7226 * configure: Regenerated.
7228 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7230 * hostio.c (handle_readlink): Decrease buffer size
7231 parameter passed to readlink by one byte.
7233 2012-11-26 Yao Qi <yao@codesourcery.com>
7235 * configure.ac (build_warnings): Append '-Wempty-body'.
7236 * configure: Regenerated.
7237 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7240 2012-11-15 Pierre Muller <muller@sourceware.org>
7242 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7243 * config.in: Regenerate.
7244 * configure: Regenerate.
7245 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7246 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7247 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7248 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7250 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7251 instead of <sys/wait.h> header.
7252 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7254 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7256 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7257 (various make rules): Remove -DGDBSERVER
7259 2012-11-09 Yao Qi <yao@codesourcery.com>
7261 * spu-low.c (current_ptid): Move it to ..
7262 * gdbthread.h: ... here. New.
7263 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7264 * server.c (myresume, process_serial_event): Likewise.
7265 * thread-db.c (thread_db_find_new_threads): Likewise.
7266 * tracepoint.c (run_inferior_command): Likewise.
7268 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7270 * server.c (handle_search_memory_1): Include access length in
7273 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7275 * linux-crisv32-low.c: Fix compile errors.
7277 2012-09-04 Yao Qi <yao@codesourcery.com>
7279 * tracepoint.c (cmd_qtsv): Adjust debug message.
7280 Don't check CUR_TPOINT.
7282 2012-08-28 Yao Qi <yao@codesourcery.com>
7284 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7285 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7286 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7287 Remove declarations of xmalloc, xreallloc, xstrdup and
7289 * Makefile.in (libiberty_h): New.
7290 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7291 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7293 2012-08-23 Yao Qi <yao@codesourcery.com>
7295 * server.h: Remove declaration of 'xsnprintf'.
7297 2012-08-22 Keith Seitz <keiths@redhat.com>
7299 * server.h: Include build-gnulib-gbserver/config.h.
7300 * gdbreplay.c: Likewise.
7302 2012-08-08 Doug Evans <dje@google.com>
7304 * Makefile.in (SFILES): Add gdb_vecs.c.
7305 (OBS): Add gdb_vecs.o.
7306 (gdb_vecs_h, host_defs_h): New variables.
7307 (thread-db.o): Add $(gdb_vecs_h) dependency.
7308 (gdb_vecs.o): New rule.
7309 * thread-db.c: #include "gdb_vecs.h".
7310 (thread_db_load_search): Use a vector to iterate over path elements.
7311 Handle text appearing after "$pdir".
7313 * configure.ac: Add check for strstr.
7314 * config.in: Regenerate.
7315 * configure: Regenerate.
7317 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7319 * hostio.c (handle_pread): If pread fails, fall back to attempting
7321 (handle_pwrite): Likewise for pwrite.
7323 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7325 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7326 between unsupported TYPE and unimplementable ADDR/LEN combination.
7327 (arm_insert_point): Act on new return value.
7329 2012-07-31 Pedro Alves <palves@redhat.com>
7331 * server.c (process_point_options): Only skip tokens if we find
7332 one that is unrecognized. Don't treat 'X' specially while
7333 skipping unrecognized tokens.
7335 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7337 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7338 to 4-byte-align HW breakpoint addresses for Thumb.
7340 2012-07-27 Yao Qi <yao@codesourcery.com>
7344 * server.h: Declare gdb_agent_about_to_close.
7345 * target.c (kill_inferior): Include "agent.h".
7346 New. Send command 'kill'.
7347 * target.h (kill_inferior): Removed macro.
7348 * tracepoint.c (gdb_agent_about_to_close): New.
7349 (gdb_agent_helper_thread): Handle command 'close'.
7350 Wait endlessly until the inferior stops.
7351 Install gdb_agent_remove_socket to atexit hook.
7352 (agent_socket_name): New static variable.
7353 (gdb_agent_socket_init): Replace local variable 'name' with
7354 'agent_socket_name'.
7355 (gdb_agent_remove_socket): New.
7357 2012-07-27 Yao Qi <yao@codesourcery.com>
7359 * server.c (process_point_options): Stop at 'X' when parsing.
7361 2012-07-19 Michael Eager <eager@eagercon.com>
7363 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7365 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7366 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7367 hardware breakpoint.
7369 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7371 * gdbserver/linux-low.c (initialize_low): Call
7372 linux_ptrace_init_warnings.
7374 2012-07-02 Doug Evans <dje@google.com>
7376 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7379 2012-07-02 Stan Shebs <stan@codesourcery.com>
7381 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7382 (ax.o): Add it to build rule.
7384 (OBS): Add format.o.
7385 (IPA_OBS): Add format.o.
7386 * server.c (handle_query): Claim support for breakpoint commands.
7387 (process_point_options): Add command case.
7388 (process_serial_event): Leave running if there are printfs in
7390 * mem-break.h (any_persistent_commands): Declare.
7391 (add_breakpoint_commands): Declare.
7392 (gdb_no_commands_at_breakpoint): Declare.
7393 (run_breakpoint_commands): Declare.
7394 * mem-break.c (struct point_command_list): New struct.
7395 (struct breakpoint): New field command_list.
7396 (any_persistent_commands): New function.
7397 (add_commands_to_breakpoint): New function.
7398 (add_breakpoint_commands): New function.
7399 (gdb_no_commands_at_breakpoint): New function.
7400 (run_breakpoint_commands): New function.
7401 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7403 * ax.c: Include format.h.
7404 (ax_printf): New function.
7405 (gdb_eval_agent_expr): Add printf opcode.
7407 2012-06-13 Yao Qi <yao@codesourcery.com>
7409 * server.c (start_inferior): Remove duplicated writes to fields
7410 'last_resume_kind' and 'last_status' of 'current_inferior'.
7412 2012-06-12 Yao Qi <yao@codesourcery.com>
7413 Pedro Alves <palves@redhat.com>
7415 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7417 * server.c (handle_v_cont): Extend comment.
7419 2012-06-11 Yao Qi <yao@codesourcery.com>
7421 * linux-low.c (linux_attach): Add 'static'.
7423 2012-06-06 Yao Qi <yao@codesourcery.com>
7425 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7427 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7429 Fix gcc -flto compilation warning.
7430 * server.c (main): Make variable multi_mode and attach volatile.
7432 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7434 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7435 if the platform doesn't know about it.
7437 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7439 * Makefile.in (SFILES): Add linux-tile-low.c.
7440 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7441 * configure.srv: Handle tilegx-*-linux*.
7442 * linux-tile-low.c: New file.
7444 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7446 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7448 2012-05-24 Pedro Alves <palves@redhat.com>
7452 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7454 2012-05-24 Pedro Alves <palves@redhat.com>
7458 Replace target_signal with gdb_signal throughout.
7460 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7462 * linux-low.c (linux_store_registers): Avoid the copying sequence
7463 when no data has been retrieved by ptrace.
7465 2012-05-22 Will Deacon <will.deacon@arm.com>
7467 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7468 Include asm/ptrace.h.
7469 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7472 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7474 * linux-low.c (linux_store_registers): Don't re-retrieve data
7475 with ptrace that has already been obtained from /proc. Always
7476 copy any data retrieved with ptrace to the buffer supplied.
7478 2012-05-11 Yao Qi <yao@codesourcery.com>
7479 Pedro Alves <palves@redhat.com>
7481 * linux-low.c (enum stopping_threads_kind): New.
7482 (stopping_threads): Change type to `enum stopping_threads_kind'.
7483 (handle_extended_wait): If stopping and suspending threads, leave
7484 the new_lwp suspended too.
7485 (linux_wait_for_event): Adjust.
7486 (stop_all_lwps): Set `stopping_threads' to
7487 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7488 whether we're suspending threads or just stopping them. Assert no
7491 2012-04-29 Yao Qi <yao@codesourcery.com>
7493 * server.h: Move some code to ...
7494 * gdbthread.h: ... here. New.
7495 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7496 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7497 (nto-low.o, win32-low.o): Likewise.
7498 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7499 * regcache.c, remote-utils.c, server.c: Likewise.
7500 * target.c, tracepoint.c, win32-low.c: Likewise.
7502 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7504 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7505 (PTRACE_ARG4_TYPE): Likewise.
7506 (PTRACE_XFER_TYPE): Likewise.
7507 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7508 ptrace to PTRACE_ARG3_TYPE.
7509 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7510 (PTRACE_ARG4_TYPE): Likewise.
7511 (PTRACE_XFER_TYPE): Likewise.
7512 (linux_detach_one_lwp): Cast fourth argument of
7513 ptrace to long then PTRACE_ARG4_TYPE.
7514 (regsets_fetch_inferior_registers): Cast third argument of
7515 ptrace to long then PTRACE_ARG3_TYPE.
7516 (regsets_store_inferior_registers): Likewise.
7518 2012-04-20 Pedro Alves <palves@redhat.com>
7520 * configure: Regenerate.
7522 2012-04-19 Pedro Alves <palves@redhat.com>
7524 * Makefile.in (GNULIB_BUILDDIR): New.
7525 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7526 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7527 (all, install-only, uninstall, clean-info, all-lib, clean): No
7528 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7529 (maintainer-clean realclean distclean): Use subdir_do.
7531 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7532 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7533 * acinclude.m4: Include acx_configure_dir.m4.
7534 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7535 calls. Call AC_PROG_RANLIB. Configure gnulib using
7538 (GNULIB_STDINT_H): Adjust.
7539 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7540 * gdbreplay.c: Include build-gnulib/config.h.
7541 * server.h: Likewise.
7542 * aclocal.m4: Regenerate.
7543 * config.in: Regenerate.
7544 * configure: Regenerate.
7546 2012-04-19 Pedro Alves <palves@redhat.com>
7548 * Makefile.in (LIBGNU, INCGNU): Adjust.
7549 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7550 (all, install-only, uninstall, clean-info, all-lib, clean)
7551 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7552 * configure.ac: Adjust AC_OUTPUT output.
7553 * aclocal.m4: Regenerate.
7554 * configure: Regenerate.
7556 2012-04-19 Pedro Alves <palves@redhat.com>
7558 * Makefile.in (generated_files): New.
7559 (server_h): Remove the explicit dependency on config.h, and depend
7560 on $generated_files.
7562 2012-04-19 Pedro Alves <palves@redhat.com>
7564 * Makefile.in (INCGNU): Add -Ignulib.
7566 2012-04-19 Pedro Alves <palves@redhat.com>
7568 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7569 (INCGNU): ... this, and spell out -I here.
7570 (GNULIB_LIB): Rename to ...
7572 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7574 2012-04-19 Pedro Alves <palves@redhat.com>
7576 * config.in: Regenerate.
7578 2012-04-19 Pedro Alves <palves@redhat.com>
7580 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7581 * server.h (memmem): Remove declaration.
7582 * config.in: Regenerate.
7583 * configure: Regenerate.
7585 2012-04-19 Yao Qi <yao@codesourcery.com>
7587 * Makefile.in (SFILES): Add common/vec.c.
7591 2012-04-19 Yao Qi <yao@codesourcery.com>
7593 * remote-utils.c (prepare_resume_reply): Replace with macro
7594 target_core_of_thread.
7595 * server.c (handle_qxfer_threads_proper): Likewise.
7596 * target.h (traget_core_of_thread): New macro.
7598 2012-04-18 Pedro Alves <palves@redhat.com>
7600 * aclocal.m4: Regenerate.
7601 * configure: Regenerate.
7603 2012-04-16 Yao Qi <yao@codesourcery.com>
7605 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7606 duplicated on address.
7608 2012-04-16 Yao Qi <yao@codesourcery.com>
7610 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7611 (struct tracepoint_action_ops) <send>: New field.
7612 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7613 (agent_expr_send, x_tracepoint_action_send): New.
7614 (l_tracepoint_action_send): New.
7615 (cmd_qtdp): Download and install tracepoint
7616 according to `use_agent'.
7617 (run_inferior_command): Add one more parameter `len'.
7619 (tracepoint_send_agent): New.
7620 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7622 2012-04-16 Yao Qi <yao@codesourcery.com>
7624 * tracepoint.c (download_tracepoints): Moved to ...
7625 (cmd_qtstart): ... here.
7627 2012-04-14 Yao Qi <yao@codesourcery.com>
7629 * tracepoint.c: Include inttypes.h.
7630 (struct collect_memory_action): Use sized types.
7631 (struct tracepoint): Likewise.
7632 (cmd_qtdp, stop_tracing): Update print specifiers.
7633 (cmd_qtp, response_tracepoint): Likewise.
7634 (collect_data_at_tracepoint): Likewise.
7635 (collect_data_at_step): Likewise.
7637 2012-04-14 Yao Qi <yao@codesourcery.com>
7639 Import gnulib module inttypes.
7640 * aclocal.m4, config.in, configure: Regenerated.
7642 2012-04-14 Yao Qi <yao@codesourcery.com>
7644 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7645 Makefile and config.status at last.
7647 2012-04-13 Yao Qi <yao@codesourcery.com>
7649 * tracepoint.c: Include stdint.h unconditionally.
7651 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7653 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7654 on BFD_HAVE_SYS_PROCFS_TYPE.
7655 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7656 * configure: Regenerate.
7657 * config.in: Likewise.
7659 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7661 * Makefile.in (clean): Also remove x32.c x32-linux.c
7662 x32-avx.c x32-avx-linux.c.
7663 (x32.o): New target.
7665 (x32-linux.o): Likewise.
7666 (x32-linux.c): Likewise.
7667 (x32-avx.o): Likewise.
7668 (x32-avx.c): Likewise.
7669 (x32-avx-linux.o): Likewise.
7670 (x32-avx-linux.c): Likewise.
7672 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7673 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7674 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7675 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7676 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7677 i386/x32-avx-linux.xml.
7679 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7680 (init_registers_x32_avx_linux): Likwise.
7681 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7682 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7684 2012-04-13 Pedro Alves <palves@redhat.com>
7686 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7687 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7688 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7689 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7692 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7694 * linux-x86-low.c (compat_x32_clock_t): New.
7695 (compat_x32_siginfo_t): Likewise.
7696 (compat_x32_siginfo_from_siginfo): Likewise.
7697 (siginfo_from_compat_x32_siginfo): Likewise.
7698 (linux_is_elf64): Likewise.
7699 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7700 and siginfo_from_compat_x32_siginfo for x32.
7701 (x86_arch_setup): Set linux_is_elf64.
7703 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7706 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7708 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7709 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7710 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7711 compatible with process.
7713 2012-04-12 Yao Qi <yao@codesourcery.com>
7715 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7716 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7717 (install-only, install-info, clean): Handle sub dir gnulib.
7718 (all-lib, am--refresh): New targets.
7719 (memmem.o): Remove target.
7720 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7721 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7722 (AC_REPLACE_FUNCS): Remove memmem.
7723 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7724 (AC_OUTPUT): Generate Makefile in gnulib/.
7725 * aclocal.m4, config.in, configure: Regenerated.
7727 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7729 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7731 2012-04-05 Pedro Alves <palves@redhat.com>
7733 -Werror=strict-aliasing
7735 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7738 2012-04-04 Pedro Alves <palves@redhat.com>
7740 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7741 (sparc_store_gregset_from_stack, sparc_store_gregset)
7742 (sparc_breakpoint_at): Fix formatting.
7744 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7746 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7748 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7749 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7750 * config.in: Regenerate.
7751 * configure: Likewise.
7753 2012-03-29 Pedro Alves <palves@redhat.com>
7755 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7756 Correct ptrace arguments.
7758 2012-03-28 Pedro Alves <palves@redhat.com>
7760 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7761 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7762 (IA64_FR1_REGNUM): New defines.
7763 (ia64_fetch_register): New.
7764 (the_low_target): Install it.
7765 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7767 * linux-low.c (linux_fetch_registers): Try the
7768 the_low_target.fetch_register hook first.
7770 * linux-arm-low.c (the_low_target): Adjust.
7771 * linux-bfin-low.c (the_low_target): Adjust.
7772 * linux-cris-low.c (the_low_target): Adjust.
7773 * linux-crisv32-low.c (the_low_target): Adjust.
7774 * linux-m32r-low.c (the_low_target): Adjust.
7775 * linux-m68k-low.c (the_low_target): Adjust.
7776 * linux-mips-low.c (the_low_target): Adjust.
7777 * linux-ppc-low.c (the_low_target): Adjust.
7778 * linux-s390-low.c (the_low_target): Adjust.
7779 * linux-sh-low.c (the_low_target): Adjust.
7780 * linux-sparc-low.c (the_low_target): Adjust.
7781 * linux-tic6x-low.c (the_low_target): Adjust.
7782 * linux-x86-low.c (the_low_target): Adjust.
7783 * linux-xtensa-low.c (the_low_target): Adjust.
7785 2012-03-26 Pedro Alves <palves@redhat.com>
7787 * server.c (handle_qxfer_libraries): Don't bail early if
7788 the_target->qxfer_libraries_svr4 is not NULL.
7790 2012-03-26 Pedro Alves <palves@redhat.com>
7792 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7794 2012-03-23 Pedro Alves <palves@redhat.com>
7796 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7797 "library-list-svr4" element's start tag when the the DSO list is
7800 2012-03-23 Pedro Alves <palves@redhat.com>
7802 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7803 a variable whose type size is the same as the inferior's pointer
7806 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7808 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7810 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7811 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7812 * linux-low.h: Include <signal.h>.
7813 (struct siginfo): Remove forward declaration.
7814 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7817 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7819 * .gitignore: Ignore more files.
7821 2012-03-19 Pedro Alves <palves@redhat.com>
7822 Jan Kratochvil <jan.kratochvil@redhat.com>
7824 * server.c (cont_thread, general_thread): Add describing comments.
7825 (start_inferior): Clear `cont_thread'.
7826 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7829 2012-03-15 Yao Qi <yao@codesourcery.com>
7831 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7833 (cmd_qtdp): ... here.
7835 2012-03-15 Yao Qi <yao@codesourcery.com>
7837 * tracepoint.c (struct tracepoint_action_ops): New.
7838 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7839 (m_tracepoint_action_download): New.
7840 (r_tracepoint_action_download): New.
7841 (x_tracepoint_action_download): New.
7842 (l_tracepoint_action_download): New.
7843 (add_tracepoint_action): Install `action->ops' according type.
7844 (download_tracepoint_1): Move code `download' function pointer
7845 of various tracepoint_action_ops.
7847 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7849 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7850 linux_ptrace_attach_warnings.
7852 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7854 * Makefile.in (linux-ptrace.o): New.
7855 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7856 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7857 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7858 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7859 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7861 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7863 2012-03-08 Yao Qi <yao@codesourcery.com>
7864 Pedro Alves <palves@redhat.com>
7866 Fix PR server/13392.
7867 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7869 * tracepoint.c (remove_tracepoint): New.
7870 (cmd_qtdp): Call remove_tracepoint when failed to install.
7872 2012-03-07 Pedro Alves <palves@redhat.com>
7874 * linux-low.c (get_detach_signal): New.
7875 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7876 Pass on pending signals to PTRACE_DETACH. Check the result of the
7878 * server.c (program_signals, program_signals_p): New.
7879 (handle_general_set): Handle QProgramSignals.
7880 * server.h (program_signals, program_signals_p): Declare.
7882 2012-03-05 Pedro Alves <palves@redhat.com>
7883 Jan Kratochvil <jan.kratochvil@redhat.com>
7885 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7888 2012-03-03 Yao Qi <yao@codesourcery.com>
7890 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7891 agent_look_up_symbols.
7893 2012-03-03 Yao Qi <yao@codesourcery.com>
7895 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7896 (linux-x86-low.o): Likewise.
7897 * server.h: Remove in_process_agent_loaded.
7898 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7902 2012-03-03 Yao Qi <yao@codesourcery.com>
7904 * tracepoint.c (gdb_agent_capability): New global.
7905 (in_process_agent_loaded_ust): Renamed to
7906 `in_process_agent_supports_ust'.
7908 (in_process_agent_supports_ust): Call agent_capability_check.
7909 (clear_installed_tracepoints): Assert that agent supports
7912 2012-03-03 Yao Qi <yao@codesourcery.com>
7914 * linux-low.c (linux_supports_agent): New.
7915 (linux_target_ops): Initialize field `supports_agent' with
7916 linux_supports_agent.
7917 * target.h (struct target_ops) <supports_agent>: New.
7918 (target_supports_agent): New macro.
7919 * server.c (handle_general_set): Handle packet 'QAgent'.
7920 (handle_query): Send `QAgent+'.
7921 * Makefile.in (server.o): Depends on agent.h.
7923 2012-03-03 Yao Qi <yao@codesourcery.com>
7925 * Makefile.in (OBS): Add agent.o.
7926 Add new rule for agent.o.
7927 Track dependence of tracepoint.c on agent.h.
7928 * tracepoint.c (run_inferior_command_1):
7929 (run_inferior_command): Call agent_run_command.
7930 (gdb_ust_connect_sync_socket): Deleted. Move it to
7932 (resume_thread, stop_thread): Likewise.
7933 (gdb_ust_socket_init): Renamed to ...
7934 (gdb_agent_socket_init): ... New.
7935 (gdb_ust_thread): Renamed to ...
7936 (gdb_agent_helper_thread): ... New.
7937 (gdb_ust_init): Move some code to ...
7938 (gdb_agent_init): ... here. New.
7939 [HAVE_UST]: Call gdb_ust_init.
7940 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7941 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7942 * config.in, configure: Regenerated.
7944 2012-03-02 Pedro Alves <palves@redhat.com>
7946 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7947 * linux-low.c (struct simple_pid_list): New.
7948 (stopped_pids): New a struct simple_pid_list pointer.
7949 (add_to_pid_list, pull_pid_from_list): New.
7950 (handle_extended_wait): Don't assume the first signal new children
7951 report is SIGSTOP. Adjust call to pull_pid_from_list.
7952 (linux_wait_for_lwp): Adjust.
7954 2012-03-02 Yao Qi <yao@codesourcery.com>
7956 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7959 2012-03-02 Yao Qi <yao@codesourcery.com>
7961 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7962 `stop_pc' and `tpoint'. Update caller.
7964 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7966 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7967 * linux-low.c (use_linux_regsets): New macro.
7968 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7969 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7970 (linux_register_in_regsets): New function.
7971 (usr_fetch_inferior_registers): Skip registers covered by
7973 (usr_store_inferior_registers): Likewise.
7974 (usr_fetch_inferior_registers): New macro.
7975 (usr_store_inferior_registers): Likewise.
7976 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7977 (linux_store_registers): Likewise.
7978 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7980 (init_registers_mips64_dsp_linux): Likewise.
7981 (init_registers_mips_linux): New macro.
7982 (init_registers_mips_dsp_linux): Likewise.
7983 (mips_dsp_num_regs): Likewise.
7984 (DSP_BASE, DSP_CONTROL): New fallback macros.
7985 (mips_base_regs): New macro.
7986 (mips_regmap): Use it. Fix the size.
7987 (mips_dsp_regmap): New variable.
7988 (mips_dsp_regset_bitmap): Likewise.
7989 (mips_arch_setup): New function.
7990 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7992 (mips_cannot_store_register): Likewise.
7993 (the_low_target): Update .arch_setup, .num_regs and .regmap
7994 initializers. Add .regset_bitmap initializer.
7995 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7997 * linux-bfin-low.c (the_low_target): Likewise.
7998 * linux-cris-low.c (the_low_target): Likewise.
7999 * linux-crisv32-low.c (the_low_target): Likewise.
8000 * linux-ia64-low.c (the_low_target): Likewise.
8001 * linux-m32r-low.c (the_low_target): Likewise.
8002 * linux-m68k-low.c (the_low_target): Likewise.
8003 * linux-ppc-low.c (the_low_target): Likewise.
8004 * linux-s390-low.c (the_low_target): Likewise.
8005 * linux-sh-low.c (the_low_target): Likewise.
8006 * linux-sparc-low.c (the_low_target): Likewise.
8007 * linux-tic6x-low.c (the_low_target): Likewise.
8008 * linux-x86-low.c (the_low_target): Likewise.
8009 * linux-xtensa-low.c (the_low_target): Likewise.
8010 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8011 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8012 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8014 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8015 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8017 2012-02-29 Yao Qi <yao@codesourcery.com>
8018 Pedro Alves <palves@redhat.com>
8020 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8021 `step_over_finished' is true.
8023 2012-02-27 Pedro Alves <palves@redhat.com>
8025 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8026 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8028 2012-02-27 Pedro Alves <palves@redhat.com>
8031 * linux-low.c (pid_is_stopped): New.
8032 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8034 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8036 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8039 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8041 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8043 2012-02-24 Luis Machado <lgustavo@codesourcery>
8045 * server.c (handle_query): Advertise support for target-side
8046 breakpoint condition evaluation.
8047 (process_point_options): New function.
8048 (process_serial_event): When inserting a breakpoint, check for
8049 a target-side condition that should be evaluated.
8051 * mem-break.c: Include regcache.h and ax.h.
8052 (point_cond_list_t): New data structure.
8053 (breakpoint) <cond_list>: New field.
8054 (find_gdb_breakpoint_at): Make non-static.
8055 (delete_gdb_breakpoint_at): Clear any target-side
8057 (clear_gdb_breakpoint_conditions): New function.
8058 (add_condition_to_breakpoint): Likewise.
8059 (add_breakpoint_condition): Likewise.
8060 (gdb_condition_true_at_breakpoint): Likewise.
8061 (gdb_breakpoint_here): Return result directly instead
8062 of going through a local variable.
8064 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8065 (clear_gdb_breakpoint_conditions): Likewise.
8066 (add_breakpoint_condition): Likewise.
8067 (gdb_condition_true_at_breakpoint): Likewise.
8069 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8070 (need_step_over_p): Take target-side breakpoint condition into
8073 2012-02-24 Luis Machado <lgustavo@codesourcery>
8075 * server.h: Include tracepoint.h.
8076 (agent_mem_read, agent_get_trace_state_variable_value,
8077 agent_set_trace_state_variable_value,
8078 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8079 get_set_tsv_func_addr): New prototypes.
8081 * ax.h: New include file.
8082 * ax.c: New source file.
8084 * tracepoint.c: Include ax.h.
8085 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8086 agent_expr, eval_result_type): Move to ax.h.
8087 (parse_agent_expr): Rename to ...
8088 (gdb_parse_agent_expr): ... this, make it non-static and move
8090 (unparse_agent_expr) Rename to ...
8091 (gdb_unparse_agent_expr): ... this, make it non-static and move
8093 (eval_agent_expr): Rename to ...
8094 (eval_tracepoint_agent_expr): ... this.
8095 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8096 forward declarations.
8097 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8098 (agent_get_trace_state_variable_value): New function.
8099 (agent_set_trace_state_variable_value): New function.
8100 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8101 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8102 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8103 (condition_true_at_tracepoint): Likewise.
8104 (parse_agent_expr): Rename to ...
8105 (gdb_parse_agent_expr): ... this and move to ax.c.
8106 (unparse_agent_expr): Rename to ...
8107 (gdb_unparse_agent_expr): ... this and move to ax.c.
8108 (gdb_agent_op_name): Move to ax.c.
8109 (eval_agent_expr): Rename to ...
8110 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8112 (eval_tracepoint_agent_expr): New function.
8113 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8115 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8117 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8118 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8119 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8120 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8121 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8122 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8123 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8124 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8125 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8126 (compile_bytecodes): Remove forward declaration.
8127 (is_goto_target): Move to ax.c.
8128 (compile_bytecodes): Move to ax.c and call
8129 agent_get_trace_state_variable_value (...) and
8130 agent_set_trace_state_variable_value (...).
8132 * Makefile.in: Update ax.c and IPA dependencies.
8134 2012-02-24 Pedro Alves <palves@redhat.com>
8136 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8137 (cmd_bigqtbuffer_circular): ... this. Only handle
8138 'QTBuffer:circular:'.
8139 (handle_tracepoint_general_set): Adjust.
8141 2012-02-16 Yao Qi <yao@codesourcery.com>
8143 * inferiors.c: Move code to ...
8144 * dll.c: .... here. New.
8145 * server.h: Declare clear_dlls.
8146 * Makefile.in (SFILES): Add dll.c.
8150 2012-02-11 Yao Qi <yao@codesourcery.com>
8152 * server.c: (handle_monitor_command): Add a new parameter
8154 (handle_query): Update caller.
8156 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8158 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8159 * configure, config.in: Regenerate.
8160 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8163 2012-02-02 Pedro Alves <palves@redhat.com>
8165 Try SIGKILL first, then PTRACE_KILL.
8166 * linux-low.c (linux_kill_one_lwp): New.
8167 (linux_kill_one_lwp): Rename to ...
8168 (kill_one_lwp_callback): ... this. Use the new
8171 2012-02-02 Pedro Alves <palves@redhat.com>
8173 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8176 2012-01-27 Pedro Alves <palves@redhat.com>
8178 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8179 (elf_64_file_p): Make static.
8180 (linux_pid_exe_is_elf_64_file): New.
8181 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8182 Delete declarations.
8183 (linux_pid_exe_is_elf_64_file): Declare.
8184 * linux-x86-low.c (x86_arch_setup): Use
8185 linux_pid_exe_is_elf_64_file.
8187 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8189 * linux-low.c (linux_wait_for_event_1): Rename to ...
8190 (linux_wait_for_event): ... here and merge it with former
8191 linux_wait_for_event - new variable wait_ptid, use it.
8192 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8194 2012-01-23 Pedro Alves <palves@redhat.com>
8196 * server.c (main): Avoid yet another case of infinite loop while
8197 detaching/killing after a longjmp.
8199 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8202 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8204 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8206 * hostio.c (handle_readlink): New function.
8207 (handle_vFile): Call it to handle "vFile:readlink" packets.
8209 2012-01-20 Pedro Alves <palves@redhat.com>
8210 Ulrich Weigand <ulrich.weigand@linaro.org>
8212 * server.c (handle_v_requests): Only support vAttach and vRun to
8213 start multiple processes when in extended protocol mode.
8215 2012-01-17 Pedro Alves <palves@redhat.com>
8217 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8218 memalign plus mprotect to allocate the scratch buffer.
8220 2012-01-13 Pedro Alves <palves@redhat.com>
8222 * server.c (attach_inferior): Clear `cont_thread'.
8224 2012-01-13 Pedro Alves <palves@redhat.com>
8226 * server.c (main): Avoid infinite loop while detaching/killing
8229 2012-01-09 Doug Evans <dje@google.com>
8231 * server.c (start_inferior): Set last_ptid in --wrapper case.
8233 2012-01-06 Yao Qi <yao@codesourcery.com>
8235 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8237 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8239 2012-01-04 Yao Qi <yao@codesourcery.com>
8241 * tracepoint.c (cmd_qtdp): Print debug message
8242 for static tracepoint.
8244 2012-01-04 Yao Qi <yao@codesourcery.com>
8246 * tracepoint.c (trace_vdebug): Differentiate debug message
8247 between gdbserver and IPA.
8249 2012-01-03 Yao Qi <yao@codesourcery.com>
8251 * tracepoint.c (tracepoint_was_hit): Don't collect for
8254 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8256 * terminal.h: Reformat copyright header.
8258 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8260 * server.c (gdbserver_version): Update copyright year.
8261 * gdbreplay.c (gdbreplay_version): Likewise.
8263 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8265 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8268 2011-12-18 Hui Zhu <teawater@gmail.com>
8269 * linux-low.c (linux_create_inferior): Save return value to ret.
8271 2011-12-18 Hui Zhu <teawater@gmail.com>
8273 * linux-low.c (linux_create_inferior): Save return value to ret.
8275 2011-12-16 Doug Evans <dje@google.com>
8277 * linux-low.c (linux_create_inferior): If stdio connection,
8278 redirect stdin from /dev/null, stdout to stderr.
8279 * remote-utils.c (remote_is_stdio): New static global.
8280 (remote_connection_is_stdio): New function.
8281 (remote_prepare): Handle stdio connection.
8282 (remote_open): Ditto.
8283 (remote_close): Don't close stdin for stdio connections.
8284 (read_prim,write_prim): New functions. Replace all calls to
8285 read/write to these.
8286 * server.c (main): Watch for "-" argument. Move call to
8287 remote_prepare before start_inferior.
8288 * server.h (STDIO_CONNECTION_NAME): New macro.
8289 (remote_connection_is_stdio): Declare.
8291 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8292 in debugging output.
8294 2011-12-15 Yao Qi <yao@codesourcery.com>
8296 * tracepoint.c: Include sys/syscall.h.
8297 (gdb_ust_thread): Remove preprocessor conditional.
8299 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8301 * linux-low.c (linux_detach_one_lwp): Call
8302 the_low_target.prepare_to_resume before detaching.
8304 2011-12-14 Yao Qi <yao@codesourcery.com>
8306 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8309 2011-12-14 Yao Qi <yao@codesourcery.com>
8311 * i386-low.c (i386_low_stopped_data_address): Initialize local
8314 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8318 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8319 DR_CONTROL unless necessary. Extend comments.
8320 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8321 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8323 2011-12-13 Yao Qi <yao@codesourcery.com>
8325 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8327 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8329 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8331 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8332 Print new debug message for such case.
8334 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8336 Fix overlapping memcpy.
8337 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8338 the read_inferior_memory transfer.
8339 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8340 write_inferior_memory transfer.
8341 (set_fast_tracepoint_jump): New variable buf. Use it for the
8342 read_inferior_memory and write_inferior_memory transfers.
8343 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8344 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8345 Use it for the write_inferior_memory transfer.
8346 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8349 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8351 * linux-low.c (fetch_register, store_register): Make code
8352 consistent, fix formatting.
8354 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8356 * linux-low.c (usr_store_inferior_registers): Factor out code
8357 to handle individual registers into...
8358 (store_register): ... this new function.
8360 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8362 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8363 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8364 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8365 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8366 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8367 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8368 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8369 (srv_xmlfiles): Add new XML files.
8371 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8373 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8374 (init_registers_s390_linux32v1): Add prototype.
8375 (init_registers_s390_linux32v2): Likewise.
8376 (init_registers_s390_linux64v1): Likewise.
8377 (init_registers_s390_linux64v2): Likewise.
8378 (init_registers_s390x_linux64v1): Likewise.
8379 (init_registers_s390x_linux64v2): Likewise.
8380 (s390_num_regs): Increment to 52.
8381 (s390_regmap): Add orig_r2 register.
8382 (s390_num_regs_3264): Increment to 68.
8383 (s390_regmap_3264): Add orig_r2 register.
8384 (s390_collect_ptrace_register): Handle orig_r2 register.
8385 (s390_supply_ptrace_register): Likewise.
8386 (s390_fill_last_break): New function.
8387 (s390_store_last_break): Likewise.
8388 (s390_fill_system_call): New function.
8389 (s390_store_system_call): Likewise.
8390 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8392 (s390_check_regset): New function.
8393 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8394 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8395 Update target_regsets for available register sets.
8397 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8398 Jan Kratochvil <jan.kratochvil@redhat.com>
8400 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8401 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8403 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8404 * linux-low.h (struct process_info_private): New member r_debug.
8405 * server.c (handle_qxfer_libraries): Call
8406 the_target->qxfer_libraries_svr4.
8407 (handle_qxfer_libraries_svr4): New function.
8408 (qxfer_packets): New entry "libraries-svr4".
8409 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8410 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8411 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8412 PACKET_qXfer_libraries_svr4.
8414 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8416 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8417 PSW address/mask between 8-byte and 16-byte formats.
8418 (s390_supply_ptrace_register): Likewise.
8419 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8420 basic addressing mode bit.
8422 2011-11-24 Stan Shebs <stan@codesourcery.com>
8424 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8426 2011-11-17 Stan Shebs <stan@codesourcery.com>
8428 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8429 (tracing_start_time): New global.
8430 (tracing_stop_time): New global.
8431 (tracing_user_name): New global.
8432 (tracing_notes): New global.
8433 (tracing_stop_note): New global.
8434 (cmd_qtstart): Set traceframe_usage, start_time.
8435 (stop_tracing): Set stop_time.
8436 (cmd_qtstatus): Report additional status.
8437 (cmd_qtp): New function.
8438 (handle_tracepoint_query): Call it.
8439 (cmd_qtnotes): New function.
8440 (handle_tracepoint_general_set): Call it.
8441 (get_timestamp): Rename from tsv_get_timestamp.
8443 2011-11-14 Stan Shebs <stan@codesourcery.com>
8444 Kwok Cheung Yeung <kcy@codesourcery.com>
8446 * linux-x86-low.c (small_jump_insn): New.
8447 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8448 trampoline and error message, build a trampoline and issue a small
8449 jump instruction to it.
8450 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8451 trampoline and error message.
8452 (x86_get_min_fast_tracepoint_insn_len): New.
8453 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8454 * linux-low.h (struct linux_target_ops): Add arguments to
8455 install_fast_tracepoint_jump_pad operation, add new operation.
8456 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8458 (linux_get_min_fast_tracepoint_insn_len): New function.
8459 (linux_target_op): Add new operation.
8460 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8461 (gdb_trampoline_buffer_end): Ditto.
8462 (gdb_trampoline_buffer_error): Ditto.
8463 (struct ipa_sym_addresses): Add fields for new IPA variables.
8464 (symbol_list): Add entries for new IPA variables.
8465 (struct tracepoint): Add fields to hold the address range of the
8466 trampoline used by the tracepoint.
8467 (trampoline_buffer_head): New static variable.
8468 (trampoline_buffer_tail): Ditto.
8469 (claim_trampoline_space): New function.
8470 (have_fast_tracepoint_trampoline_buffer): New function.
8471 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8473 (install_fast_tracepoint): Ditto, also add error buffer argument.
8474 (cmd_qtminftpilen): New function.
8475 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8476 (fast_tracepoint_from_trampoline_address): New function.
8477 (fast_tracepoint_collecting): Handle trampoline as part of jump
8479 (set_trampoline_buffer_space): New function.
8480 (initialize_tracepoint): Initialize new IPA variables.
8481 * target.h (struct target_ops): Add arguments to
8482 install_fast_tracepoint_jump_pad operation, add new
8483 get_min_fast_tracepoint_insn_len operation.
8484 (target_get_min_fast_tracepoint_insn_len): New.
8485 (install_fast_tracepoint_jump_pad): Add arguments.
8486 * server.h (IPA_BUFSIZ): Define.
8487 * linux-i386-ipa.c: Include extra header files.
8488 (initialize_fast_tracepoint_trampoline_buffer): New function.
8489 (initialize_low_tracepoint): Call it.
8490 * server.h (set_trampoline_buffer_space): Declare.
8491 (claim_trampoline_space): Ditto.
8492 (have_fast_tracepoint_trampoline_buffer): Ditto.
8494 2011-11-14 Yao Qi <yao@codesourcery.com>
8496 * server.c (handle_query): Handle InstallInTrace for qSupported.
8497 * tracepoint.c (add_tracepoint): Sort list.
8498 (install_tracepoint, download_tracepoint): New.
8499 (cmd_qtdp): Call them to install and download tracepoints.
8500 (sort_tracepoints): Removed.
8501 (cmd_qtstart): Update.
8503 2011-11-14 Yao Qi <yao@codesourcery.com>
8505 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8506 * mem-break.h: Declare.
8507 * tracepoint.c (cmd_qtstart): Move some code to ...
8508 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8510 (download_tracepoints): Move some code to ...
8511 (download_tracepoint_1): ... here. New.
8513 2011-11-08 Yao Qi <yao@codesourcery.com>
8515 * remote-utils.c (relocate_instruction): A comment fix.
8517 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8519 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8520 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8521 dr_status_mirror and dr_control_mirror from debug_reg_state.
8522 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8523 (i386_initial_stuff): Remove use of deleted globals.
8524 (i386_get_thread_context, i386_set_thread_context,
8525 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8526 from debug_reg_state.
8528 2011-11-05 Yao Qi <yao@codesourcery.com>
8530 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8531 address as TPOINT's.
8533 2011-11-02 Stan Shebs <stan@codesourcery.com>
8535 * tracepoint.c (agent_mem_read_string): New function.
8536 (eval_agent_expr): Call it for tracenz.
8537 * server.c (handle_query): Report support for tracenz.
8539 2011-11-02 Yao Qi <yao@codesourcery.com>
8541 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8543 2011-11-02 Yao Qi <yao@codesourcery.com>
8545 * target.h: Fix a typo in comment.
8547 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8549 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8550 clobber the breakpoints' shadows with fast tracepoint jumps.
8551 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8552 * target.c (write_inferior_memory): Also pass MYADDR down to
8555 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8557 * configure.ac: Check support for personality routine.
8558 * configure: Regenerate.
8559 * config.in: Likewise.
8560 * linux-low.c: Include <sys/personality.h>.
8561 Define ADDR_NO_RANDOMIZE if necessary.
8562 (linux_create_inferior): Disable address space randomization when
8563 forking inferior, if requested.
8564 (linux_supports_disable_randomization): New function.
8565 (linux_target_ops): Install it.
8566 * server.h (disable_randomization): Declare.
8567 * server.c (disable_randomization): New global variable.
8568 (handle_general_set): Handle QDisableRandomization.
8569 (handle_query): Likewise for qSupported.
8570 (main): Support --disable-randomization and --no-disable-randomization
8571 command line arguments.
8572 * target.h (struct target_ops): Add supports_disable_randomization.
8573 (target_supports_disable_randomization): New macro.
8575 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8577 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8579 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8580 [!PT_GETDSBT] (target_loadmap): New definition.
8581 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8582 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8583 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8584 and PT_GETDSBT to LINUX_LOADMAP.
8585 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8586 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8588 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8590 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8591 (arm_linux_hwbp_cap): New static variable.
8592 (arm_linux_get_hwbp_cap): Replace by ...
8593 (arm_linux_init_hwbp_cap): ... this new function.
8594 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8595 (arm_linux_get_hw_watchpoint_count): Likewise.
8596 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8597 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8598 (arm_prepare_to_resume): Use perror_with_name instead of error.
8600 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8602 * linux-arm-low.c: Include <signal.h>.
8603 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8604 (struct arm_linux_hwbp_cap): New data type.
8605 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8606 (struct arm_linux_hw_breakpoint): New data type.
8607 (MAX_BPTS, MAX_WPTS): Define.
8608 (struct arch_process_info, struct arch_lwp_info): New data types.
8609 (arm_linux_get_hwbp_cap): New function.
8610 (arm_linux_get_hw_breakpoint_count): Likewise.
8611 (arm_linux_get_hw_watchpoint_count): Likewise.
8612 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8613 (arm_hwbp_control_initialize): Likewise.
8614 (arm_hwbp_control_is_enabled): Likewise.
8615 (arm_hwbp_control_is_initialized): Likewise.
8616 (arm_hwbp_control_disable): Likewise.
8617 (arm_linux_hw_breakpoint_equal): Likewise.
8618 (arm_linux_hw_point_initialize): Likewise.
8619 (struct update_registers_data): New data structure.
8620 (update_registers_callback: New function.
8621 (arm_insert_point): Likewise.
8622 (arm_remove_point): Likewise.
8623 (arm_stopped_by_watchpoint): Likewise.
8624 (arm_stopped_data_address): Likewise.
8625 (arm_new_process): Likewise.
8626 (arm_new_thread): Likewise.
8627 (arm_prepare_to_resume): Likewise.
8628 (the_low_target): Register arm_insert_point, arm_remove_point,
8629 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8630 arm_new_thread, and arm_prepare_to_resume.
8632 2011-09-15 Stan Shebs <stan@codesourcery.com>
8634 * server.h (struct emit_ops): Add compare-goto fields.
8635 * tracepoint.c (gdb_agent_op_sizes): New table.
8636 (emit_eq_goto): New function.
8637 (emit_ne_goto): New function.
8638 (emit_lt_goto): New function.
8639 (emit_le_goto): New function.
8640 (emit_gt_goto): New function.
8641 (emit_ge_goto): New function.
8642 (is_goto_target): New function.
8643 (compile_bytecodes): Recognize special cases of compare-goto
8644 combinations and call specialized emitters for them.
8645 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8646 (amd64_emit_ne_goto): New function.
8647 (amd64_emit_lt_goto): New function.
8648 (amd64_emit_le_goto): New function.
8649 (amd64_emit_gt_goto): New function.
8650 (amd64_emit_ge_goto): New function.
8651 (amd64_emit_ops): Add the new functions.
8652 (i386_emit_eq_goto): New function.
8653 (i386_emit_ne_goto): New function.
8654 (i386_emit_lt_goto): New function.
8655 (i386_emit_le_goto): New function.
8656 (i386_emit_gt_goto): New function.
8657 (i386_emit_ge_goto): New function.
8658 (i386_emit_ops): Add the new functions.
8660 2011-09-08 Stan Shebs <stan@codesourcery.com>
8662 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8663 (i386_emit_epilogue): Restore %ebx.
8665 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8667 * server.c (step_thread): Remove definition.
8668 (process_serial_event): Don't handle Hs.
8669 * server.h (step_thread): Remove declaration.
8670 * target.c (set_desired_inferior): Remove use of step_thread.
8672 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8674 * linux-low.c: Include linux-procfs.h.
8675 (linux_attach_lwp_1): Update comments.
8676 (linux_attach): Scan for existing threads when attaching to a
8677 process that is the tgid.
8678 * Makefile.in: Update dependencies.
8680 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8682 * configure.srv: Add linux-procfs.o dependencies.
8684 2011-08-14 Yao Qi <yao@codesourcery.com>
8686 * target.h (struct target_ops): Fix indent.
8687 * win32-low.c (win32_target_ops): Fix comment.
8689 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8690 Yao Qi <yao@codesourcery.com>
8692 * Makefile.in (clean): Remove tic6x-*.c files.
8693 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8694 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8695 (tic6x-c64xp-linux.c): Likewise.
8696 * configure.srv: Add support for tic6x-*-uclinux.
8697 * linux-tic6x-low.c: New.
8698 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8700 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8701 Yao Qi <yao@codesourcery.com>
8703 * target.h (struct target_ops): Add read_loadmap.
8704 * linux-low.c (struct target_loadseg): New type.
8705 (struct target_loadmap): New type.
8706 (linux_read_loadmap): New function.
8707 (linux_target_ops): Add linux_read_loadmap.
8708 * server.c (handle_query): Support qXfer:fdpic:read packet.
8709 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8712 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8714 * win32-low.c: Include <stdint.h>.
8716 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8718 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8719 to the inferior here.
8720 (i386_remove_aligned_watchpoint): Ditto.
8721 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8722 fit part of the watchpoint in the debug registers.
8723 (i386_update_inferior_debug_regs): New.
8724 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8725 registers, and only update the inferior on success.
8726 (i386_low_remove_watchpoint): Ditto.
8728 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8730 * linux-low.c (compare_ints, unique, list_threads, show_process,
8731 linux_core_of_thread): Delete.
8732 (linux_target_ops): Change linux_core_of_thread to
8733 linux_common_core_of_thread.
8734 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8735 * utils.c (malloc_failure): Change type of argument.
8736 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8737 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8738 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8739 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8740 (IPA_OBJS): Add common-utils-ipa.o.
8741 (ptid_h, linux_osdata_h): New macros.
8742 (server_h): Add common/common-utils.h, common/xml-utils.h,
8743 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8745 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8746 ptid.o, buffer.o): New rules.
8747 (linux-low.o): Add common/linux-osdata.h as a dependency.
8748 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8749 * configure.ac: Add AC_HEADER_DIRENT check.
8750 * config.in: Regenerate.
8751 * configure: Regenerate.
8752 * remote-utils.c (xml_escape_text): Delete.
8753 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8754 buffer_xml_printf): Move to common/buffer.c.
8755 * server.c (main): Remove call to initialize_inferiors.
8756 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8757 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8758 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8759 internal_error, gdb_assert, gdb_assert_fail): Delete.
8760 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8761 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8763 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8764 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8765 initialize_inferiors): Delete.
8767 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8769 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8772 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8774 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8776 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8778 2011-05-26 Yao Qi <yao@codesourcery.com>
8780 * Makefile.in (thread-db.o): Track dependence to
8781 common/gdb_thread_db.h.
8782 * thread-db.c: include gdb_thread_db.h from right place.
8784 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8786 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8787 __FILE__ and __LINE__ to internal_error.
8789 2011-05-13 Doug Evans <dje@google.com>
8791 * thread-db.c (try_thread_db_load_from_sdir): New function.
8792 (try_thread_db_load_from_dir): New function.
8793 (thread_db_load_search): Handle $sdir, ignore $pdir.
8794 Remove trying of system directories if search of
8795 libthread-db-search-path fails, that is now done via $sdir.
8797 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8799 * server.c (handle_query): Add EnableDisableTracepoints to the list
8800 of supported features.
8801 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8803 (cmd_qtenable_disable): New.
8804 (cmd_qtstart): Install tracepoints even if disabled.
8805 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8806 receiving a QTEnable or QTDisable packet.
8807 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8808 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8810 (gdb_probe): Skip data collection if static tracepoint is disabled.
8812 2011-05-10 Doug Evans <dje@google.com>
8814 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8816 2011-05-04 Doug Evans <dje@google.com>
8818 * linux-low.c (linux_join): Skip process lookup.
8819 * spu-low.c (spu_join): Ditto.
8820 * server.c (join_inferiors_callback): Delete.
8821 (process_serial_event): For 'D' packet (detach) call join_inferior
8824 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8826 * README: Don't mention xscale*-*-linux*.
8827 * configure.srv (xscale*-*-linux*): Don't handle target.
8829 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8831 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8833 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8834 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8835 (i386_emit_void_call_2): Likewise.
8837 2011-04-26 Yao Qi <yao@codesourcery.com>
8839 * linux-low.c: Move common macros to linux-ptrace.h.
8840 Include linux-ptrace.h.
8841 * Makefile.in (linux_ptrace_h): New.
8842 (linux-low.o): Depends on linux-ptrace.h.
8844 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8846 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8847 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8848 (remote_prepare): New function with most of the TCP code from ...
8849 (remote_open): ... here. Detect PORT here unconditionally. Move also
8850 setting transport_is_reliable.
8851 * server.c (run_once): New variable.
8852 (gdbserver_usage): Document it.
8853 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8854 the first run if RUN_ONCE.
8855 * server.h (run_once, remote_prepare): New declarations.
8857 2011-04-19 Tom Tromey <tromey@redhat.com>
8859 * win32-low.c (handle_load_dll): Remove duplicate "the".
8861 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8863 Remove support for old Cygwin 1.5 versions.
8864 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8865 function to avoid warning.
8866 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8869 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8871 * gdbserver/server.h (Macro _): Define it if not available.
8873 2011-03-14 Michael Snyder <msnyder@vmware.com>
8875 * hostio.c (handle_close): Remove unnecessary null test.
8877 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8879 * Makefile.in (maintainer-clean realclean distclean): Remove
8880 "make ... subdir_do" command.
8882 2011-03-10 Michael Snyder <msnyder@vmware.com>
8884 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8886 * server.c (handle_v_run): Free alloced buffer on early return.
8888 2011-03-09 Yao Qi <yao@codesourcery.com>
8891 2011-03-04 Yao Qi <yao@codesourcery.com>
8893 * Makefile.in: Remove GNU make feature --directory.
8895 2011-03-05 Yao Qi <yao@codesourcery.com>
8897 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8898 (subdir_do): New make target. Copied from gdb/Makefile.
8899 (maintainer-clean, realclean, distclean, clean): Call corresponding
8900 make targets in common/Makefile.
8902 2011-02-11 Yao Qi <yao@codesourcery.com>
8904 * configure.ac: Call AC_PROG_RANLIB.
8905 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8906 * configure: Regenerate.
8908 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8910 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8912 2011-03-06 Yao Qi <yao@codesourcery.com>
8914 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8916 2011-03-05 Yao Qi <yao@codesourcery.com>
8918 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8919 (subdir_do): New make target. Copied from gdb/Makefile.
8920 (maintainer-clean, realclean, distclean, clean): Call corresponding
8921 make targets in common/Makefile.
8923 2011-03-04 Yao Qi <yao@codesourcery.com>
8925 * Makefile.in: Remove GNU make feature --directory.
8927 2011-03-04 Michael Snyder <msnyder@vmware.com>
8929 * server.c (queue_stop_reply): Call xmalloc not malloc.
8931 2011-03-02 Michael Snyder <msnyder@vmware.com>
8933 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8935 2011-02-28 Michael Snyder <msnyder@vmware.com>
8937 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8938 (cmd_qtframe): Ditto.
8939 (cmd_qtbuffer): Ditto.
8940 (cmd_bigqtbuffer): Ditto.
8942 * utils.c (decimal2str): Initialize 'width' to nine, then
8945 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8947 * hostio.c (require_data): Free *data, not data.
8949 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8951 * hostio.c (require_data): Use free, not xfree.
8953 2011-02-27 Michael Snyder <msnyder@vmware.com>
8955 * server.c (handle_query): Discard unused value.
8957 * hostio.c (require_data): Free malloc memory before returning
8960 2011-02-26 Michael Snyder <msnyder@vmware.com>
8962 * linux-low.c (list_threads): Call closedir for dirent.
8964 2011-02-27 Michael Snyder <msnyder@vmware.com>
8966 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8967 a case statement falls through.
8969 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8971 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8974 2011-02-26 Michael Snyder <msnyder@vmware.com>
8976 * utils.c (decimal2str): Eliminate dead code and dead param.
8977 (pulongest): Drop dead param from call to decimal2str.
8980 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8982 Revert the following patch (not approved yet):
8983 2011-02-21 Hui Zhu <teawater@gmail.com>
8984 * tracepoint.c (tp_printf): New function.
8985 (eval_agent_expr): Handle gdb_agent_op_printf.
8987 2011-02-21 Hui Zhu <teawater@gmail.com>
8989 * tracepoint.c (tp_printf): New function.
8990 (eval_agent_expr): Handle gdb_agent_op_printf.
8992 2011-02-18 Tom Tromey <tromey@redhat.com>
8994 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8995 (tracepoint.o): Likewise.
8996 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8997 (gdb_agent_op_names): Likewise.
8999 2011-02-18 Tom Tromey <tromey@redhat.com>
9001 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9002 gdb_agent_op_rot>: New constants.
9003 (gdb_agent_op_names): Add pick and roll.
9004 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9007 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9009 * aclocal.m4: Regenerated with aclocal-1.11.1.
9011 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9013 * server.c (handle_qxfer_traceframe_info): New.
9014 (qxfer_packets): Register "traceframe-info".
9015 (handle_query): Report support for qXfer:traceframe-info:read+.
9016 * tracepoint.c (match_blocktype): New.
9017 (traceframe_find_block_type): Rename to ...
9018 (traceframe_walk_blocks): ... this. Add callback filter argument,
9020 (traceframe_find_block_type): New, reimplemented on top of
9021 traceframe_walk_blocks.
9022 (build_traceframe_info_xml): New.
9023 (traceframe_read_info): New.
9024 * server.h (traceframe_read_info): Declare.
9026 2011-02-11 Yao Qi <yao@codesourcery.com>
9028 * configure.ac: Call AC_PROG_RANLIB.
9029 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9030 * configure: Regenerate.
9032 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9034 * server.c (gdb_read_memory): Change return semantics to allow
9036 (handle_search_memory_1): Adjust.
9037 (process_serial_event) <'m' packet>: Handle partial transfers.
9038 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9040 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9042 * regcache.c (init_register_cache): Initialize
9043 regcache->register_status.
9044 (free_register_cache): Release regcache->register_status.
9045 (regcache_cpy): Copy register_status.
9046 (registers_to_string): Print 'x's for unavailable registers.
9047 (supply_register): Mark the register's status valid or
9048 unavailable, depending on whether a buffer was passed in or not.
9049 (supply_register_zeroed): New.
9050 (supply_regblock): Mark the registers' status valid or
9051 unavailable, depending on whether a buffer was passed in or not.
9052 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9053 (struct regcache): New `register_status' field.
9054 (supply_register_zeroed): Declare.
9055 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9056 supply_register_zeroed, rather than passing a NULL buffer to
9058 * tracepoint.c (fetch_traceframe_registers): Update comment.
9060 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9062 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9065 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9067 * server.h (decode_xfer_write): Change prototype.
9068 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9069 and don't extract the annex here.
9070 * server.c (decode_xfer_read): Remove `annex' parameter,
9071 and don't extract the annex here.
9073 (struct qxfer): New.
9074 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9075 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9076 (handle_qxfer_statictrace): New functions, abstracted out from
9077 handle_query, and made to use the struct qxfer interface.
9078 (handle_threads_qxfer_proper): Rename to ...
9079 (handle_qxfer_threads_proper): ... this.
9080 (handle_threads_qxfer): Rename to ...
9081 (handle_qxfer_threads): ... this. Adjust.
9082 (qxfer_packets): New array.
9083 (handle_qxfer): New function.
9084 (handle_query): Use handle_qxfer.
9086 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9088 * gdbreplay.c: Shorten lines of >= 80 columns.
9089 * linux-low.c: Ditto.
9090 * linux-ppc-low.c: Ditto.
9091 * linux-s390-low.c: Ditto.
9092 * linux-sparc-low.c: Ditto.
9093 * linux-x86-low.c: Ditto.
9094 * linux-xtensa-low.c: Ditto.
9095 * mem-break.c: Ditto.
9097 * regcache.h: Ditto.
9098 * remote-utils.c: Ditto.
9101 * thread-db.c: Ditto.
9102 * tracepoint.c: Ditto.
9104 * win32-low.h: Ditto.
9106 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9108 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9111 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9113 * server.c (gdbserver_version): Update copyright year in version
9115 * gdbreplay.c (gdbreplay_version): Ditto.
9117 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9119 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9120 * linux-bfin-low.c: New file.
9121 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9122 PT_DATA_ADDR for BFIN targets.
9123 * Makefile.in (SFILES): Add linux-bfin-low.c.
9124 (clean): Remove reg-bfin.c.
9125 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9126 * README: Mention supported Blackfin targets.
9128 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9130 * .gitignore: New file.
9132 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9134 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9136 2010-10-22 Jie Zhang <jie@codesourcery.com>
9138 * Makefile.in: Add FLAGS_TO_PASS variable.
9139 (install): Remove dependency of install-only and recursively
9140 invoke make for install-only.
9142 2010-10-04 Doug Evans <dje@google.com>
9144 * Makefile.in (uninstall): Use $(DESTDIR).
9146 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9150 * linux-x86-low.c (compat_siginfo_from_siginfo)
9151 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9152 si_code is < 0. Check for si_code == SI_TIMER before checking for
9155 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9157 * lynx-i386-low.c: New file.
9158 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9160 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9162 * lynx-low.c (ptrace_request_to_str): Remove handling for
9163 request values that have been removed in LynxOS 5.x.
9165 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9167 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9170 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9172 * configure.ac: Add --enable-inprocess-agent option.
9173 * configure: Rebuilt.
9175 2010-09-06 Yao Qi <yao@codesourcery.com>
9177 * linux-low.c (linux_kill): Remove unused variable.
9178 (linux_stabilize_threads): Likewise.
9179 * server.c (start_inferior): Likewise.
9180 (queue_stop_reply_callback): Likewise.
9181 * tracepoint.c (do_action_at_tracepoint): Likewise.
9183 2010-09-06 Yao Qi <yao@codesourcery.com>
9185 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9188 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9190 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9192 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9194 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9197 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9199 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9200 gdbserver/lynx-ppc-low.c: New files.
9201 * Makefile.in (lynx_low_h): New variable.
9202 (lynx-low.o, lynx-ppc-low.o): New rules.
9203 * configure.ac: On LynxOS, link with -lnetinet.
9204 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9205 * configure: regenerate.
9207 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9209 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9210 * configure.ac: Add check for vasprintf and vsnprintf.
9211 * configure, config.in: Regenerate.
9212 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9214 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9216 * gdbreplay.c: Move include of alloca.h up, next to include of
9218 * server.h: Add include of malloc.h.
9219 * mem-break.c: Remove include of malloc.h.
9220 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9222 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9224 * Makefile.in (memmem.o): Build with -Wno-error.
9226 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9228 * utils.c (xsnprintf): Make non-static.
9229 * server.h: Add xsnprintf declaration.
9230 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9231 replace calls to snprintf by calls to xsnprintf throughout.
9233 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9235 * configure.ac: Add configure check for alloca.
9236 * configure, config.in: Regenerate.
9237 * server.h: Include alloca.h if it exists.
9238 * gdbreplay.c: Include alloca.h if it exists.
9240 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9242 * linux-low.c (__SIGRTMIN): Define if not already defined.
9243 (linux_create_inferior): Check for __ANDROID__ rather than
9245 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9246 are already deferred.
9247 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9248 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9249 stopped and already has a pending signal to report.
9250 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9251 a pending signal to report or is moving out of a jump pad.
9252 (linux_init_signals): Check for __ANDROID__ rather than
9255 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9257 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9258 debug_threads check. Avoid a linear search when not doing debug
9261 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9263 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9264 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9265 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9266 (process_event): Change local fd's type to gdb_fildes_t.
9267 (create_file_handler): Adjust prototype.
9268 (delete_file_handler): Adjust prototype.
9269 (handle_file_event): Adjust prototype. Use pfildes.
9270 (create_file_event): Adjsut prototype.
9271 * remote-utils.c (remote_desc, listen_desc): Change type to
9273 * server.h: New gdb_fildes_t typedef.
9274 [USE_WIN32API]: Include winsock2.h.
9275 (delete_file_handler, add_file_handler): Adjust prototypes.
9277 * utils.c (pfildes): New.
9279 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9281 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9282 * configure: Regenerate.
9284 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9286 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9287 (linux_done_accessing_memory): ... this.
9288 (linux_target_ops): Adjust.
9289 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9290 * nto-low.c (nto_target_ops): Adjust comment.
9291 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9292 * spu-low.c (spu_target_ops): Adjust comment.
9293 * target.h (target_ops): Rename unprepare_to_access_memory field
9294 to done_accessing_memory.
9295 (unprepare_to_access_memory): Rename to ...
9296 (done_accessing_memory): ... this.
9298 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9300 * linux-low.c (linux_prepare_to_access_memory): New.
9301 (linux_unprepare_to_access_memory): New.
9302 (linux_target_ops): Install them.
9303 * server.c (read_memory): Rename to ...
9304 (gdb_read_memory): ... this. Use
9305 prepare_to_access_memory/prepare_to_access_memory.
9306 (write_memory): Rename to ...
9307 (gdb_write_memory): ... this. Use
9308 prepare_to_access_memory/prepare_to_access_memory.
9309 (handle_search_memory_1): Adjust.
9310 (process_serial_event): Adjust.
9311 * target.h (struct target_ops): New fields
9312 prepare_to_access_memory and unprepare_to_access_memory.
9313 (prepare_to_access_memory, unprepare_to_access_memory): New.
9314 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9315 prepare_to_access_memory/prepare_to_access_memory.
9316 * nto-low.c (nto_target_ops): Adjust.
9317 * spu-low.c (spu_target_ops): Adjust.
9318 * win32-low.c (win32_target_ops): Adjust.
9320 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9322 * Makefile.in (WARN_CFLAGS): Get it from configure.
9323 (WERROR_CFLAGS): New.
9324 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9325 * configure.ac: Introduce --enable-werror, which adds -Werror to
9326 the compiler command line. Enabled by default. Disable with
9327 --disable-werror. Add -Wdeclaration-after-statement
9328 Wpointer-arith and -Wformat-nonliteral to warning flags.
9329 * configure: Regenerate.
9331 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9333 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9335 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9337 * gdbreplay.c (remote_error): New.
9339 (expect): Use gdbchar. Check for error reading from GDB.
9340 Clarify sync error output.
9341 (play): Check for errors writing to GDB.
9342 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9343 * remote-utils.c (getpkt): Check for errors writing to the remote
9346 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9348 * linux-low.c (linux_wait_1): Move non-debugging code out of
9349 `debug_threads' control.
9351 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9353 * linux-low.c (linux_wait_1): Don't set last_status here.
9354 * server.c (push_event, queue_stop_reply_callback): Assert we're
9355 not pushing a TARGET_WAITKIND_IGNORE event.
9356 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9357 (myresume, handle_target_event): Set the thread's last_resume_kind
9358 and last_status from the target returned status.
9360 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9364 * linux-x86-low.c (update_debug_registers_callback): New.
9365 (i386_dr_low_set_addr): Use it.
9366 (i386_dr_low_get_addr): New.
9367 (i386_dr_low_set_control): Use update_debug_registers_callback.
9368 (i386_dr_low_get_control): New.
9369 (i386_dr_low_get_status): Adjust.
9370 * linux-low.c (linux_stop_lwp): New.
9371 * linux-low.h (linux_stop_lwp): Declare.
9373 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9374 argument instead of a i386_debug_reg_state.
9375 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9376 a i386_debug_reg_state.
9377 (i386_insert_aligned_watchpoint): Adjust.
9378 (i386_remove_aligned_watchpoint): Adjust.
9379 (i386_low_stopped_data_address): Read the debug registers from the
9380 inferior instead of from the mirrors.
9381 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9382 (i386_dr_low_get_addr): Declare.
9383 (i386_dr_low_get_control): Declare.
9384 (i386_dr_low_get_status): Change prototype.
9386 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9387 (i386_dr_low_get_addr): New.
9388 (i386_dr_low_get_control): New.
9389 (i386_dr_low_get_status): Adjust prototype. Return
9391 (i386_initial_stuff): Clear dr_status_mirror and
9393 (i386_get_thread_context): Adjust.
9394 (i386_set_thread_context): Adjust.
9395 (i386_thread_added): Adjust.
9397 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9399 * linux-low.h (linux_thread_area): Delete declaration.
9401 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9403 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9404 after its termination.
9406 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9408 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9409 (gdb_wants_all_stopped): Delete.
9410 (linux_wait_1): Don't call them.
9411 * server.c (handle_v_cont): Tag all threads as want-stopped.
9412 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9413 stopped as "client-wants-stopped".
9415 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9417 * Makefile.in (signals_h): New.
9418 (server_h): Depend on it.
9419 (server.o): Don't depend on $(signals_def).
9420 (signals.o): Depend on $(signals_def).
9422 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9424 * Makefile.in (signals_def): New.
9425 (server_h): Append include/gdb/signals.h and signals_def.
9426 (server.o): Append signals_def.
9428 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9430 * server.c (handle_target_event): Use target_signal_to_host for
9431 resume_info.sig initialization.
9432 * target.h (struct thread_resume) <sig>: New comment.
9434 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9436 * server.c (handle_query): strcpy() the returned string from paddress()
9437 instead of sprintf().
9438 * utils.c (paddress): Return phex_nz().
9440 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9442 * server.c (handle_v_cont): Call mourn_inferior if process
9444 (myresume): Likewise.
9446 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9448 Static tracepoints, and integration with UST.
9450 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9451 * mem-break.c (uninsert_all_breakpoints)
9452 (reinsert_all_breakpoints): New.
9453 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9454 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9455 (gdb_agent_ust_loaded, helper_thread_id)
9456 (gdb_agent_helper_thread_id): New macros.
9457 (struct ipa_sym_addresses): Add addr_ust_loaded,
9458 addr_helper_thread_id, addr_cmd_buf.
9459 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9460 (in_process_agent_loaded_ust): New.
9461 (write_e_ust_not_loaded): New.
9462 (maybe_write_ipa_ust_not_loaded): New.
9463 (struct collect_static_trace_data_action): New.
9464 (enum tracepoint_type) <static_tracepoint>: New.
9465 (struct tracepoint) <handle>: Mention static tracepoints.
9466 (struct static_tracepoint_ctx): New.
9467 (CMD_BUF_SIZE): New.
9468 (add_tracepoint_action): Handle static tracepoint actions.
9469 (unprobe_marker_at): New.
9470 (clear_installed_tracepoints): Handle static tracepoints.
9471 (cmd_qtdp): Handle static tracepoints.
9472 (probe_marker_at): New.
9473 (cmd_qtstart): Handle static tracepoints.
9474 (response_tracepoint): Handle static tracepoints.
9475 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9476 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9477 (get_context_regcache): Handle static tracepoints.
9478 (do_action_at_tracepoint): Handle static tracepoint actions.
9479 (traceframe_find_block_type): Handle static trace data blocks.
9480 (traceframe_read_sdata): New.
9481 (download_tracepoints): Download static tracepoint actions.
9482 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9483 (GDB_PROBE_NAME): New.
9488 (ust_marker_to_static_tracepoint): New.
9490 (collect_ust_data_at_tracepoint): New.
9491 (gdb_ust_probe): New.
9492 (UNIX_PATH_MAX, SOCK_DIR): New.
9493 (gdb_ust_connect_sync_socket): New.
9494 (resume_thread, stop_thread): New.
9495 (run_inferior_command): New.
9496 (init_named_socket): New.
9497 (gdb_ust_socket_init): New.
9498 (cstr_to_hexstr): New.
9500 (first_marker, next_marker): New.
9501 (response_ust_marker): New.
9502 (cmd_qtfstm, cmd_qtsstm): New.
9503 (unprobe_marker_at, probe_marker_at): New.
9504 (cmd_qtstmat, gdb_ust_thread): New.
9505 (gdb_ust_init): New.
9506 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9507 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9509 (x86_64_st_collect_regmap): New.
9510 (X86_64_NUM_ST_COLLECT_GREGS): New.
9511 (AMD64_RIP_REGNUM): New.
9512 (supply_static_tracepoint_registers): New.
9513 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9515 (i386_st_collect_regmap): New.
9516 (i386_NUM_ST_COLLECT_GREGS): New.
9517 (supply_static_tracepoint_registers): New.
9518 * server.c (handle_query): Handle qXfer:statictrace:read.
9519 <qSupported>: Report support for StaticTracepoints, and
9520 qXfer:statictrace:read features.
9521 * server.h (traceframe_read_sdata)
9522 (supply_static_tracepoint_registers): Declare.
9523 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9524 (unpack_varlen_hex): Include in IPA build.
9525 * Makefile.in (ustlibs, ustinc): New.
9526 (IPA_OBJS): Add remote-utils-ipa.o.
9527 ($(IPA_LIB)): Link -ldl and -lpthread.
9529 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9530 * config.in, configure: Regenerate.
9532 2010-06-20 Ian Lance Taylor <iant@google.com>
9533 Pedro Alves <pedro@codesourcery.com>
9535 * linux-x86-low.c (always_true): Delete.
9536 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9537 trying to fool the compiler with always_true.
9539 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9541 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9542 conditions in gdbserver.
9544 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9546 * spu-low.c (spu_read_memory): Wrap around local store limit.
9547 (spu_write_memory): Likewise.
9549 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9551 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9552 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9554 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9556 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9557 uses with LONGEST uses.
9559 2010-06-14 Stan Shebs <stan@codesourcery.com>
9560 Pedro Alves <pedro@codesourcery.com>
9564 * linux-x86-low.c: Include limits.h.
9569 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9570 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9571 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9572 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9573 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9574 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9575 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9576 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9577 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9578 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9579 (amd64_emit_void_call_2): New.
9580 (amd64_emit_ops): New.
9581 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9582 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9583 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9584 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9585 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9586 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9587 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9588 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9589 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9590 (i386_emit_stack_adjust, i386_emit_int_call_1)
9591 (i386_emit_void_call_2): New.
9592 (i386_emit_ops): New.
9593 (x86_emit_ops): New.
9594 (the_low_target): Install x86_emit_ops.
9595 * server.h (struct emit_ops): New.
9596 (get_raw_reg_func_addr): Declare.
9597 (current_insn_ptr, emit_error): Declare.
9598 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9599 (set_trace_state_variable_value): New defines.
9600 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9601 addr_get_trace_state_variable_value and
9602 addr_set_trace_state_variable_value.
9603 (symbol_list): New fields for get_raw_reg,
9604 get_trace_state_variable_value and set_trace_state_variable_value.
9605 (condfn): New typedef.
9606 (struct tracepoint): New field `compiled_cond'.
9607 (do_action_at_tracepoint): Clear compiled_cond.
9608 (get_trace_state_variable_value, set_trace_state_variable_value):
9610 (condition_true_at_tracepoint): If there's a compiled condition,
9612 (current_insn_ptr, emit_error): New globals.
9613 (struct bytecode_address): New.
9614 (get_raw_reg_func_addr): New.
9615 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9616 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9617 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9618 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9619 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9620 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9621 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9622 (compile_tracepoint_condition, compile_bytecodes): New.
9623 * target.h (emit_ops): Forward declare.
9624 (struct target_ops): New field emit_ops.
9625 (target_emit_ops): New.
9626 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9627 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9628 * linux-low.c (linux_emit_ops): New.
9629 (linux_target_ops): Install it.
9630 * linux-low.h (struct linux_target_ops): New field emit_ops.
9632 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9634 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9635 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9637 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9638 Stan Shebs <stan@codesourcery.com>
9640 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9641 (all): Depend on $(extra_libraries).
9642 (install-only): Install the IPA.
9643 (IPA_OBJS, IPA_LIB): New.
9644 (clean): Remove the IPA lib.
9645 (IPAGENT_CFLAGS): New.
9646 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9647 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9648 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9649 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9650 * configure.ac: Check for atomic builtins support in the compiler.
9651 (IPA_DEPFILES, extra_libraries): Define.
9652 * configure.srv (ipa_obj): Add description.
9653 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9654 (i[34567]86-*-linux*): Set ipa_obj.
9655 (x86_64-*-linux*): Set ipa_obj.
9656 * linux-low.c (stabilizing_threads): New.
9657 (supports_fast_tracepoints): New.
9658 (linux_detach): Stabilize threads before detaching.
9659 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9660 the lwp is either not stabilizing, or is moving out of a jump pad.
9661 (linux_fast_tracepoint_collecting): New.
9662 (maybe_move_out_of_jump_pad): New.
9663 (enqueue_one_deferred_signal): New.
9664 (dequeue_one_deferred_signal): New.
9665 (linux_wait_for_event_1): If moving out of a jump pad, defer
9666 pending signals to later.
9667 (linux_stabilize_threads): New.
9668 (linux_wait_1): Check if threads need moving out of jump pads, and
9670 (stuck_in_jump_pad_callback): New.
9671 (move_out_of_jump_pad_callback): New.
9673 (linux_resume_one_lwp): Handle moving out of jump pads.
9674 (linux_set_resume_request): Dequeue deferred signals.
9675 (need_step_over_p): Also step over fast tracepoint jumps.
9676 (start_step_over): Also uninsert fast tracepoint jumps.
9677 (finish_step_over): Also reinsert fast tracepoint jumps.
9678 (linux_install_fast_tracepoint_jump): New.
9679 (linux_target_ops): Install linux_stabilize_threads and
9680 linux_install_fast_tracepoint_jump_pad.
9681 * linux-low.h (linux_target_ops) <get_thread_area,
9682 install_fast_tracepoint_jump_pad>: New fields.
9683 (struct lwp_info) <collecting_fast_tracepoint,
9684 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9685 (linux_get_thread_area): Declare.
9686 * linux-x86-low.c (jump_insn): New.
9687 (x86_get_thread_area): New.
9688 (append_insns): New.
9690 (amd64_install_fast_tracepoint_jump_pad): New.
9691 (i386_install_fast_tracepoint_jump_pad): New.
9692 (x86_install_fast_tracepoint_jump_pad): New.
9693 (the_low_target): Install x86_get_thread_area and
9694 x86_install_fast_tracepoint_jump_pad.
9695 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9696 (struct fast_tracepoint_jump): New.
9697 (fast_tracepoint_jump_insn): New.
9698 (fast_tracepoint_jump_shadow): New.
9699 (find_fast_tracepoint_jump_at): New.
9700 (fast_tracepoint_jump_here): New.
9701 (delete_fast_tracepoint_jump): New.
9702 (set_fast_tracepoint_jump): New.
9703 (uninsert_fast_tracepoint_jumps_at): New.
9704 (reinsert_fast_tracepoint_jumps_at): New.
9705 (set_breakpoint_at): Use write_inferior_memory.
9706 (uninsert_raw_breakpoint): Use write_inferior_memory.
9707 (check_mem_read): Mask out fast tracepoint jumps.
9708 (check_mem_write): Mask out fast tracepoint jumps.
9709 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9710 (set_fast_tracepoint_jump): Declare.
9711 (delete_fast_tracepoint_jump)
9712 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9713 (reinsert_fast_tracepoint_jumps_at): Declare.
9714 * regcache.c: Don't compile many functions when building the
9715 in-process agent library.
9716 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9717 the register buffer in the heap.
9718 (free_register_cache): If the register buffer isn't owned by the
9719 regcache, don't free it.
9720 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9721 pre-existing register caches.
9722 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9724 (convert_ascii_to_int): : Constify `from' parameter type.
9725 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9726 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9727 the needed buffer in-place.
9728 (relocate_instruction): New.
9729 * server.c (handle_query) <qSymbols>: If the target supports
9730 tracepoints, give it a chance of looking up symbols. Report
9731 support for fast tracepoints.
9732 (handle_status): Stabilize threads.
9733 (process_serial_event): Adjust.
9734 * server.h (struct fast_tracepoint_jump): Forward declare.
9735 (struct process_info) <fast_tracepoint_jumps>: New field.
9736 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9737 (decode_X_packet, decode_M_packet): Adjust.
9738 (relocate_instruction): Declare.
9739 (in_process_agent_loaded): Declare.
9740 (tracepoint_look_up_symbols): Declare.
9741 (struct fast_tpoint_collect_status): Declare.
9742 (fast_tracepoint_collecting): Declare.
9743 (force_unlock_trace_buffer): Declare.
9744 (handle_tracepoint_bkpts): Declare.
9745 (initialize_low_tracepoint)
9746 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9747 * target.h (struct target_ops) <stabilize_threads,
9748 install_fast_tracepoint_jump_pad>: New fields.
9749 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9750 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9751 [HAVE_STDINT_H]: Include stdint.h.
9752 (trace_debug_1): Rename to ...
9753 (trace_vdebug): ... this.
9754 (trace_debug): Rename to ...
9755 (trace_debug_1): ... this. Add `level' parameter.
9757 (ATTR_USED, ATTR_NOINLINE): New.
9758 (IP_AGENT_EXPORT): New.
9759 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9760 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9761 (about_to_request_buffer_space, trace_buffer_is_full)
9762 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9763 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9764 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9765 (traceframe_write_count, traceframes_created)
9766 (trace_state_variables)
9767 New renaming defines.
9768 (struct ipa_sym_addresses): New.
9769 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9771 (ipa_sym_addrs): New.
9772 (all_tracepoint_symbols_looked_up): New.
9773 (in_process_agent_loaded): New.
9774 (write_e_ipa_not_loaded): New.
9775 (maybe_write_ipa_not_loaded): New.
9776 (tracepoint_look_up_symbols): New.
9777 (debug_threads) [IN_PROCESS_AGENT]: New.
9778 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9779 (UNKNOWN_SIDE_EFFECTS): New.
9780 (stop_tracing): New.
9781 (flush_trace_buffer): New.
9782 (stop_tracing_bkpt): New.
9783 (flush_trace_buffer_bkpt): New.
9784 (read_inferior_integer): New.
9785 (read_inferior_uinteger): New.
9786 (read_inferior_data_pointer): New.
9787 (write_inferior_data_pointer): New.
9788 (write_inferior_integer): New.
9789 (write_inferior_uinteger): New.
9790 (struct collect_static_trace_data_action): Delete.
9791 (enum tracepoint_type): New.
9792 (struct tracepoint) <type>: New field `type'.
9793 <actions_str, step_actions, step_actions_str>: Only include in
9795 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9796 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9797 (tracepoints): Use IP_AGENT_EXPORT.
9798 (last_tracepoint): Don't include in the IPA.
9799 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9800 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9801 (alloced_trace_state_variables): New.
9802 (trace_state_variables): Use IP_AGENT_EXPORT.
9803 (traceframe_t): Delete unused variable.
9804 (circular_trace_buffer): Don't include in the IPA.
9805 (trace_buffer_start): Delete.
9806 (struct trace_buffer_control): New.
9807 (trace_buffer_free): Delete.
9808 (struct ipa_trace_buffer_control): New.
9809 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9810 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9812 (trace_buffer_ctrl): New.
9813 (TRACE_BUFFER_CTRL_CURR): New.
9814 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9815 Reimplement as macros.
9816 (trace_buffer_wrap): Delete.
9817 (traceframe_write_count, traceframe_read_count)
9818 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9819 (struct tracepoint_hit_ctx) <type>: New field.
9820 (struct fast_tracepoint_ctx): New.
9821 (memory_barrier): New.
9823 (record_tracepoint_error): Update atomically in the IPA.
9824 (clear_inferior_trace_buffer): New.
9825 (about_to_request_buffer_space): New.
9826 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9827 updating the same buffer.
9828 (add_tracepoint): Default the tracepoint's type to trap
9829 tracepoint, and orig_size to -1.
9830 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9832 (create_trace_state_variable): New parameter `gdb'. Handle it.
9833 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9834 (cmd_qtdp): Handle fast tracepoints.
9836 (max_jump_pad_size): New.
9837 (gdb_jump_pad_head): New.
9838 (get_jump_space_head): New.
9839 (claim_jump_space): New.
9840 (sort_tracepoints): New.
9841 (MAX_JUMP_SIZE): New.
9842 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9844 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9845 support. Upload fast traceframes, and delete internal IPA
9847 (stop_tracing_handler): New.
9848 (flush_trace_buffer_handler): New.
9849 (cmd_qtstop): Upload fast tracepoints.
9850 (response_tracepoint): Handle fast tracepoints.
9851 (tracepoint_finished_step): Upload fast traceframes. Set the
9852 tracepoint hit context's tracepoint type.
9853 (handle_tracepoint_bkpts): New.
9854 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9855 type. Add comment about fast tracepoints.
9856 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9857 non-existing action_str field.
9858 (get_context_regcache): Handle fast tracepoints.
9859 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9861 (fast_tracepoint_from_jump_pad_address): New.
9862 (fast_tracepoint_from_ipa_tpoint_address): New.
9863 (collecting_t): New.
9864 (force_unlock_trace_buffer): New.
9865 (fast_tracepoint_collecting): New.
9868 (write_inferior_data_ptr): New.
9869 (target_tp_heap): New.
9870 (target_malloc): New.
9871 (download_agent_expr): New.
9873 (download_tracepoints): New.
9874 (download_trace_state_variables): New.
9875 (upload_fast_traceframes): New.
9876 (IPA_FIRST_TRACEFRAME): New.
9877 (IPA_NEXT_TRACEFRAME_1): New.
9878 (IPA_NEXT_TRACEFRAME): New.
9879 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9880 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9881 (gdb_jump_pad_buffer_end): New.
9882 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9883 (initialize_tracepoint): Adjust.
9884 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9885 buffer. Initialize the low module.
9886 * utils.c (PREFIX, TOOLNAME): New.
9887 (malloc_failure): Use PREFIX.
9888 (error): In the IPA, an error causes an exit.
9889 (fatal, warning): Use PREFIX.
9890 (internal_error): Use TOOLNAME.
9891 (NUMCELLS): Increase to 10.
9892 * configure, config.in: Regenerate.
9894 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9896 * server.c (handle_query) <qSupported>: Do two passes over the
9897 qSupported string to avoid nesting strtok.
9899 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9901 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9903 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9905 * configure: Regenerate.
9906 * proc-service.list: New.
9908 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9910 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9913 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9915 * gdbreplay.c (remote_open): Check error return from socket() call by
9916 its equality to -1 not by it being negative.
9917 * remote-utils.c (remote_open): Likewise.
9919 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9921 * config.h: Regenerate.
9923 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9925 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9926 doesn't provide PTRACE_GET_THREAD_AREA.
9928 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9930 * linux-m68k-low.c: Include <asm/ptrace.h>
9931 (ps_get_thread_area): Implement.
9933 2010-05-03 Doug Evans <dje@google.com>
9935 * event-loop.c (struct callback_event): New struct.
9936 (callback_list): New global.
9937 (append_callback_event, delete_callback_event): New functions.
9938 (process_callback): New function.
9939 (start_event_loop): Call it.
9940 * remote-utils.c (NOT_SCHEDULED): Define.
9941 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9942 moved out of readchar.
9943 (readchar): Rewrite. Call reschedule before returning.
9944 (reset_readchar): New function.
9945 (remote_close): Call it.
9946 (process_remaining, reschedule): New functions.
9947 * server.h (callback_handler_func): New typedef.
9948 (append_callback_event, delete_callback_event): Declare.
9950 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9952 * proc-service.c (ps_pglobal_lookup): Use
9953 thread_db_look_up_one_symbol.
9954 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9955 parameter. Use it instead of all_symbols_looked_up.
9956 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9958 (all_symbols_looked_up): Don't declare.
9959 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9960 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9962 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9963 Set all_symbols_looked_up here.
9964 (thread_db_look_up_one_symbol): New.
9965 (thread_db_get_tls_address): Adjust.
9966 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9967 thread_db object on the heap, and tentatively set it in the
9969 (thread_db_init): Don't set all_symbols_looked_up here.
9970 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9972 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9974 * linux-low.c (linux_kill, linux_detach): Adjust.
9975 (status_pending_p_callback): Remove redundant statement. Check
9976 for !TARGET_WAITIKIND_IGNORE, instead of
9977 TARGET_WAITKIND_STOPPED.
9978 (handle_tracepoints): Make sure LWP is locked. Adjust.
9979 (linux_wait_for_event_1): Adjust.
9980 (linux_cancel_breakpoints): New.
9981 (unsuspend_one_lwp): New.
9982 (unsuspend_all_lwps): New.
9983 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9984 (send_sigstop_callback): Change return type to int, add new
9985 `except' parameter and handle it.
9986 (suspend_and_send_sigstop_callback): New.
9987 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9988 pass them down. If SUSPEND, also increment the lwp's suspend
9990 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9991 (need_step_over_p): Don't consider suspended LWPs.
9992 (start_step_over): Adjust.
9993 (proceed_one_lwp): Change return type to int, add new `except'
9994 parameter and handle it.
9995 (unsuspend_and_proceed_one_lwp): New.
9996 (proceed_all_lwps): Use find_inferior instead of
9998 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9999 also decrement the suspend count of LWPs. Pass `except' down,
10000 instead of hacking its suspend count.
10001 (linux_pause_all): Add `freeze' parameter. Adjust.
10002 (linux_unpause_all): New.
10003 (linux_target_ops): Install linux_unpause_all.
10004 * server.c (handle_status): Adjust.
10005 * target.h (struct target_ops): New fields `unpause_all' and
10006 `cancel_breakpoints'. Add new parameter to `pause_all'.
10007 (pause_all): Add new `freeze' parameter.
10008 (unpause_all): New.
10009 (cancel_breakpoints): New.
10010 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10011 cancel breakpoints.
10012 (cmd_qtstart): Pause threads.
10013 (stop_tracing): Pause threads, and cancel breakpoints.
10014 * win32-low.c (win32_target_ops): Adjust.
10016 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10018 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10019 the inferior right away from here...
10020 (linux_wait_1): ... to here, and adjust to check the thread's
10021 last_resume_kind instead of the lwp's step or stop_expected flags.
10023 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10025 * README: Use consistent `GDB' and `GDBserver' spellings.
10027 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10029 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10030 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10031 (linux_detach_one_lwp): Assume the lwp is stopped.
10032 (any_thread_of): Delete.
10033 (linux_detach): Stop all lwps here. Don't blindly delete all
10035 (delete_lwp_callback): New.
10036 (linux_mourn): Delete all lwps of the process that is gone.
10037 (linux_wait_1): Don't delete the last lwp of the process here.
10038 * mem-break.h (mark_breakpoints_out): Declare.
10039 * mem-break.c (mark_breakpoints_out): New.
10040 (free_all_breakpoints): Use it.
10041 * server.c (handle_target_event): If the process is gone, mark
10043 * thread-db.c (struct thread_db) <create_bp>: New field.
10044 (thread_db_enable_reporting): Fix prototype. Store a thread event
10045 breakpoint reference in the thread_db struct.
10046 (thread_db_load_search): Clear the thread_db object.
10047 (try_thread_db_load_1): Ditto.
10048 (switch_to_process): New.
10049 (disable_thread_event_reporting): Use it.
10050 (remove_thread_event_breakpoints): New.
10051 (thread_db_detach, thread_db_mourn): Use it.
10053 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10055 * linux-low.c (linux_enable_event_reporting): New.
10056 (linux_wait_for_event_1, handle_extended_wait): Use it.
10058 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10060 * linux-low.c (linux_kill_one_lwp, linux_kill)
10061 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10062 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10063 SIGSTOP even if the LWP is stopped.
10064 (send_sigstop_callback): New.
10065 (stop_all_lwps): Use send_sigstop_callback instead.
10066 (linux_resume_one_thread): Adjust.
10067 (proceed_one_lwp): Still proceed an LWP that the client has
10068 requested to stop, if we haven't reported it as stopped yet. Make
10069 sure that LWPs the client want stopped, have a pending SIGSTOP.
10071 2010-04-26 Doug Evans <dje@google.com>
10073 * server.c (handle_general_set): Make static.
10075 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10076 Print received char after testing for error/eof instead of before.
10077 (input_interrupt): Tweak comment.
10079 2010-04-23 Doug Evans <dje@google.com>
10081 * server.c (start_inferior): Print inferior argv if --debug.
10083 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10085 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10086 * nto-x86-low.c: Include server.h
10088 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10090 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10091 be consistent with other sources of this directory.
10092 (init_registers_amd64): Correct name of source file of this function
10095 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10097 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10098 64-bit executables.
10100 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10102 * win32-i386-low.c: Add 64-bit support.
10103 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10104 (init_registers_amd64): Declare.
10105 (mappings): Add 64-bit version of array.
10106 (init_windows_x86): New function.
10107 (the_low_target): Change init_arch field to init_windows_x86.
10109 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10111 * win32-low.c: Adapt to support also 64-bit architecture.
10112 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10113 (get_image_name): Use SIZE_T type for local variable `done'.
10114 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10115 (toolhelp_get_dll_name): Idem.
10116 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10117 Use uintptr_t typecast to avoid warning.
10118 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10119 (handle_exception): Use phex_nz to avoid warning.
10120 (win32_wait): Remove unused local variable `process'.
10122 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10124 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10127 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10129 * configure.ac: Use `ws2_32' library for srv_mingw.
10130 * configure: Regenerate.
10131 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10132 * remote-utils.c: Likewise.
10134 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10136 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10137 if __x86_64__ is defined.
10139 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10141 * configure: Regenerate.
10143 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10145 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10146 * target.h (target_ops): New get_tib_address field.
10147 * win32-low.h (win32_thread_info): Add thread_local_base field.
10148 * win32-low.c (child_add_thread): Add tlb argument.
10149 Set thread_local_base field to TLB.
10150 (get_child_debug_event): Adapt to child_add_thread change.
10151 (win32_get_tib_address): New function.
10152 (win32_target_ops): Set get_tib_address field to
10153 win32_get_tib_address.
10154 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10156 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10158 * linux-low.c (linux_mourn): Also remove the process.
10159 * server.c (handle_target_event): Don't remove the process here.
10160 * nto-low.c (nto_mourn): New.
10161 (nto_target_ops): Install it.
10162 * spu-low.c (spu_mourn): New.
10163 (spu_target_ops): Install it.
10164 * win32-low.c (win32_mourn): New.
10165 (win32_target_ops): Install it.
10167 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10169 * server.h (buffer_xml_printf): Remove redundant `;'.
10171 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10173 * regcache.c (set_register_cache): Invalidate regcaches before
10174 changing the register cache layout.
10175 (regcache_invalidate_one): Allow a NULL regcache.
10176 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10177 regcaches before changing the register cache layout or the target
10180 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10182 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10183 variable warning on Linux/x86-64.
10185 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10187 GDBserver disconnected tracing support.
10189 * linux-low.c (linux_remove_process): Delete.
10190 (add_lwp): Don't set last_resume_kind here.
10191 (linux_kill): Use `mourn'.
10192 (linux_detach): Use `thread_db_detach', and `mourn'.
10193 (linux_mourn): New.
10194 (linux_attach_lwp_1): Adjust comment.
10195 (linux_attach): last_resume_kind moved the thread_info; adjust.
10196 (status_pending_p_callback): Adjust.
10197 (linux_wait_for_event_1): Adjust.
10198 (count_events_callback, select_singlestep_lwp_callback)
10199 (select_event_lwp_callback, cancel_breakpoints_callback)
10200 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10201 (proceed_one_lwp): Adjust.
10202 (linux_async): Add debug output.
10203 (linux_thread_stopped): New.
10204 (linux_pause_all): New.
10205 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10207 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10208 (thread_db_free): Delete declaration.
10209 (thread_db_detach, thread_db_mourn): Declare.
10210 * thread-db.c (thread_db_init): Use thread_db_mourn.
10211 (thread_db_free): Delete, split in two.
10212 (disable_thread_event_reporting): New.
10213 (thread_db_detach): New.
10214 (thread_db_mourn): New.
10216 * server.h (struct thread_info) <last_resume_kind>: New field.
10217 <attached>: Add comment.
10218 <gdb_detached>: New field.
10219 (handler_func): Change return type to int.
10220 (handle_serial_event, handle_target_event): Ditto.
10221 (gdb_connected): Declare.
10223 (disconnected_tracing): Declare.
10224 (stop_tracing): Declare.
10226 * server.c (handle_query) <qSupported>: Report support for
10227 disconnected tracing.
10228 (queue_stop_reply_callback): Account for running threads.
10229 (gdb_wants_thread_stopped): New.
10230 (gdb_wants_all_threads_stopped): New.
10231 (gdb_reattached_process): New.
10232 (handle_status): Clear the `gdb_detached' flag of all processes.
10233 In all-stop, stop all threads.
10234 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10235 (process_serial_event): If the remote connection breaks, or if an
10236 exit was forced with "monitor exit", force an event loop exit.
10237 Handle disconnected tracing on detach.
10238 (handle_serial_event): Adjust.
10239 (handle_target_event): If GDB isn't connected, forward events back
10240 to the inferior, unless the last process exited, in which case,
10241 exit gdbserver. Adjust interface.
10243 * remote-utils.c (remote_open): Don't block in accept. Instead
10244 register an event loop source on the listen socket file
10245 descriptor. Refactor bits into ...
10246 (listen_desc): ... this new global.
10247 (gdb_connected): ... this new function.
10248 (enable_async_notification): ... this new function.
10249 (handle_accept_event): ... this new function.
10250 (remote_close): Clear remote_desc.
10252 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10254 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10256 (mourn_inferior): Define.
10257 (target_process_qsupported): Avoid the dangling else problem.
10258 (thread_stopped): Define.
10259 (pause_all): Define.
10260 (target_waitstatus_to_string): Declare.
10261 * target.c (target_waitstatus_to_string): New.
10263 * tracepoint.c (tracing): Make extern.
10264 (disconnected_tracing): New.
10265 (stop_tracing): Make extern. Handle tracing stops due to GDB
10267 (cmd_qtdisconnected): New.
10268 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10269 (handle_tracepoint_general_set): Handle QTDisconnected.
10271 * event-loop.c (event_handler_func): Change return type to int.
10272 (process_event): Bail out if the event handler wants the event
10274 (handle_file_event): Ditto.
10275 (start_event_loop): Bail out if the event handler wants the event
10278 * nto-low.c (nto_target_ops): Adjust.
10279 * spu-low.c (spu_wait): Don't remove the process here.
10280 (spu_target_ops): Adjust.
10281 * win32-low.c (win32_wait): Don't remove the process here.
10282 (win32_target_ops): Adjust.
10284 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10286 * regcache.c (realloc_register_cache): Invalidate inferior's
10287 regcache before recreating it.
10289 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10291 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10293 2010-04-09 Stan Shebs <stan@codesourcery.com>
10294 Pedro Alves <pedro@codesourcery.com>
10296 * server.h (LONGEST): New.
10297 (struct thread_info) <while_stepping>: New field.
10298 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10300 (initialize_tracepoint, handle_tracepoint_general_set)
10301 (handle_tracepoint_query, tracepoint_finished_step)
10302 (tracepoint_was_hit, release_while_stepping_state_list):
10303 (current_traceframe): Declare.
10304 * server.c (handle_general_set): Handle tracepoint packets.
10305 (read_memory): New.
10306 (write_memory): New.
10307 (handle_search_memory_1): Use read_memory.
10308 (handle_query): Report support for conditional tracepoints, trace
10309 state variables, and tracepoint sources. Handle tracepoint
10311 (main): Initialize the tracepoints module.
10312 (process_serial_event): Handle traceframe reads/writes.
10314 * linux-low.c (handle_tracepoints): New.
10315 (linux_wait_1): Call it.
10316 (linux_resume_one_lwp): Handle while-stepping.
10317 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10318 (linux_target_ops): Install them.
10319 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10321 * linux-x86-low.c (x86_supports_tracepoints): New.
10322 (the_low_target). Install it.
10324 * mem-break.h (delete_breakpoint): Declare.
10325 * mem-break.c (delete_breakpoint): Make external.
10327 * target.h (struct target_ops): Add `supports_tracepoints',
10328 `read_pc', and `write_pc' fields.
10329 (target_supports_tracepoints): Define.
10330 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10333 * regcache.h (struct regcache) <registers_owned>: New field.
10334 (init_register_cache, regcache_cpy): Declare.
10335 (regcache_read_pc, regcache_write_pc): Declare.
10336 (register_cache_size): Declare.
10337 (supply_regblock): Declare.
10338 * regcache.c (init_register_cache): New.
10339 (new_register_cache): Use it.
10340 (regcache_cpy): New.
10341 (register_cache_size): New.
10342 (supply_regblock): New.
10343 (regcache_read_pc, regcache_write_pc): New.
10345 * tracepoint.c: New.
10347 * Makefile.in (OBS): Add tracepoint.o.
10348 (tracepoint.o): New rule.
10350 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10352 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10354 (i386-mmx.c): Likewise.
10355 (i386-mmx-linux.o): Likewise.
10356 (i386-mmx-linux.c): Likewise.
10358 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10359 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10360 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10361 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10363 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10364 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10365 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10367 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10369 * Makefile.in (clean): Updated.
10371 (i386-avx.c): Likewise.
10372 (i386-avx-linux.o): Likewise.
10373 (i386-avx-linux.c): Likewise.
10374 (amd64-avx.o): Likewise.
10375 (amd64-avx.c): Likewise.
10376 (amd64-avx-linux.o): Likewise.
10377 (amd64-avx-linux.c): Likewise.
10379 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10380 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10381 (srv_amd64_regobj): Add amd64-avx.o.
10382 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10383 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10384 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10385 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10386 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10387 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10388 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10390 * i387-fp.c: Include "i386-xstate.h".
10392 (i387_cache_to_xsave): Likewise.
10393 (i387_xsave_to_cache): Likewise.
10394 (x86_xcr0): Likewise.
10396 * i387-fp.h (i387_cache_to_xsave): Likewise.
10397 (i387_xsave_to_cache): Likewise.
10398 (x86_xcr0): Likewise.
10400 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10401 * linux-crisv32-low.c (target_regsets): Likewise.
10402 * linux-m68k-low.c (target_regsets): Likewise.
10403 * linux-mips-low.c (target_regsets): Likewise.
10404 * linux-ppc-low.c (target_regsets): Likewise.
10405 * linux-s390-low.c (target_regsets): Likewise.
10406 * linux-sh-low.c (target_regsets): Likewise.
10407 * linux-sparc-low.c (target_regsets): Likewise.
10408 * linux-xtensa-low.c (target_regsets): Likewise.
10410 * linux-low.c: Include <sys/uio.h>.
10411 (regsets_fetch_inferior_registers): Support nt_type.
10412 (regsets_store_inferior_registers): Likewise.
10413 (linux_process_qsupported): New.
10414 (linux_target_ops): Add linux_process_qsupported.
10416 * linux-low.h (regset_info): Add nt_type.
10417 (linux_target_ops): Add process_qsupported.
10419 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10421 (init_registers_i386_avx_linux): New.
10422 (init_registers_amd64_avx_linux): Likewise.
10423 (xmltarget_i386_linux_no_xml): Likewise.
10424 (xmltarget_amd64_linux_no_xml): Likewise.
10425 (PTRACE_GETREGSET): Likewise.
10426 (PTRACE_SETREGSET): Likewise.
10427 (x86_fill_xstateregset): Likewise.
10428 (x86_store_xstateregset): Likewise.
10429 (use_xml): Likewise.
10430 (x86_linux_update_xmltarget): Likewise.
10431 (x86_linux_process_qsupported): Likewise.
10432 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10433 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10434 init_registers_i386_linux here. Call
10435 x86_linux_update_xmltarget.
10436 (the_low_target): Add x86_linux_process_qsupported.
10438 * server.c (handle_query): Call target_process_qsupported.
10440 * target.h (target_ops): Add process_qsupported.
10441 (target_process_qsupported): New.
10443 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10445 * inferiors.c (add_thread): Set last_status kind to
10446 TARGET_WAITKIND_IGNORE.
10447 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10448 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10449 (linux_wait_1): Move `thread' local definition to block that uses
10450 it. Don't NULL initialize `event_child'.
10451 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10452 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10453 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10455 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10457 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10458 an extended waitstatus, or by a watchpoint.
10459 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10460 thread was stepping or has been stopped by a watchpoint.
10462 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10464 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10465 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10466 of another, then delete the previous, and validate all
10468 (validate_inserted_breakpoint): New.
10469 (delete_disabled_breakpoints): New.
10470 (validate_breakpoints): New.
10471 (check_mem_read): Validate breakpoints before trusting their
10472 shadow. Delete disabled breakpoints.
10473 (check_mem_write): Validate breakpoints before trusting they
10474 should be inserted. Delete disabled breakpoints.
10475 * mem-break.h (validate_breakpoints):
10476 * server.c (handle_query): Validate breakpoints when we see a
10479 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10481 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10482 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10483 if we could tell there's a GDB breakpoint at stop_pc.
10484 (need_step_over_p): Don't do a step over if we find a GDB
10485 breakpoint at the resume PC.
10487 * mem-break.c (struct raw_breakpoint): New.
10488 (enum bkpt_type): New type `gdb_breakpoint'.
10489 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10490 fields. New field `raw'.
10491 (find_raw_breakpoint_at): New.
10492 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10493 breakpoint instead.
10494 (set_breakpoint_at): Adjust.
10495 (delete_raw_breakpoint): New.
10496 (release_breakpoint): New.
10497 (delete_breakpoint): Rename to...
10498 (delete_breakpoint_1): ... this. Add proc parameter. Use
10499 release_breakpoint. Return ENOENT.
10500 (delete_breakpoint): Reimplement.
10501 (find_breakpoint_at): Delete.
10502 (find_gdb_breakpoint_at): New.
10503 (delete_breakpoint_at): Delete.
10504 (set_gdb_breakpoint_at): New.
10505 (delete_gdb_breakpoint_at): New.
10506 (gdb_breakpoint_here): New.
10507 (set_reinsert_breakpoint): Use release_breakpoint.
10508 (uninsert_breakpoint): Rename to ...
10509 (uninsert_raw_breakpoint): ... this.
10510 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10511 (reinsert_raw_breakpoint): Change parameter type to
10513 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10515 (check_breakpoints): Adjust. Use release_breakpoint.
10516 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10517 (breakpoint_inserted_here): Ditto.
10518 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10519 Don't trust the breakpoint's shadow if it is not inserted.
10520 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10521 (delete_all_breakpoints): Adjust.
10522 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10523 use delete_breakpoint_1.
10525 * mem-break.h (breakpoints_supported): Delete declaration.
10526 (set_gdb_breakpoint_at): Declare.
10527 (gdb_breakpoint_here): Declare.
10528 (delete_breakpoint_at): Delete.
10529 (delete_gdb_breakpoint_at): Declare.
10531 * server.h (struct raw_breakpoint): Forward declare.
10532 (struct process_info): New field `raw_breakpoints'.
10534 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10537 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10539 * linux-low.c (status_pending_p_callback): Fix comment.
10540 (linux_wait_for_event_1): Move most of the internal breakpoint
10541 handling from here...
10542 (linux_wait_1): ... to here.
10543 (count_events_callback): New.
10544 (select_singlestep_lwp_callback): New.
10545 (select_event_lwp_callback): New.
10546 (cancel_breakpoints_callback): New.
10547 (select_event_lwp): New.
10548 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10549 priority to all LWPs that have had events that should be reported
10550 to the client. Cancel breakpoints when about to reporting the
10551 event to the client, not while stopping lwps. No longer cancel
10552 finished single-steps here.
10553 (cancel_finished_single_step): Delete.
10554 (cancel_finished_single_steps): Delete.
10556 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10558 * mem-break.c (enum bkpt_type): New.
10559 (struct breakpoint): New field `type'.
10560 (set_breakpoint_at): Change return type to struct breakpoint
10561 pointer. Set type to `other_breakpoint' by default.
10562 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10563 in the breakpoint list.
10564 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10565 (reinsert_breakpoint): Rename to ...
10566 (reinsert_raw_breakpoint): ... this.
10567 (reinsert_breakpoints_at): Adjust.
10568 * mem-break.h (struct breakpoint): Declare.
10569 (set_breakpoint_at): Change return type to struct breakpoint
10572 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10574 * server.c (handle_query): Assign, not compare.
10576 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10578 Teach linux gdbserver to step-over-breakpoints.
10580 * linux-low.c (can_hardware_single_step): New.
10581 (supports_breakpoints): New.
10582 (handle_extended_wait): If stopping threads, read the stop pc of
10583 the new cloned LWP.
10585 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10586 low target doesn't support retrieving the PC.
10587 (add_lwp): Set last_resume_kind to resume_continue.
10588 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10589 (linux_attach): Don't clear stop_expected. Set the lwp's
10590 last_resume_kind to resume_stop.
10591 (linux_detach_one_lwp): Don't check for removed breakpoints.
10592 (check_removed_breakpoint): Delete.
10593 (status_pending_p): Rename to ...
10594 (status_pending_p_callback): ... this. Don't check for removed
10595 breakpoints. Don't consider threads that are stopped from GDB's
10597 (linux_wait_for_lwp): Always read the stop_pc here.
10598 (cancel_breakpoint): New.
10599 (step_over_bkpt): New global.
10600 (linux_wait_for_event_1): Implement stepping over breakpoints.
10601 (gdb_wants_lwp_stopped): New.
10602 (gdb_wants_all_stopped): New.
10603 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10604 single-step traps here. Store the thread's last reported target
10606 (send_sigstop): Don't clear stop_expected. Always set it,
10608 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10609 (cancel_finished_single_step): New.
10610 (cancel_finished_single_steps): New.
10611 (wait_for_sigstop): Don't cancel finished single-step traps here.
10612 (linux_resume_one_lwp): Don't check for removed breakpoints.
10613 Don't set `step' on non-hardware step archs.
10614 (linux_set_resume_request): Ignore resume_stop requests if already
10615 stopping or stopped. Set the lwp's last_resume_kind.
10616 (resume_status_pending_p): Don't check for removed breakpoints.
10617 (need_step_over_p): New.
10618 (start_step_over): New.
10619 (finish_step_over): New.
10620 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10621 requests. Clear the thread's last reported target waitstatus.
10622 Don't use the `suspended' flag. Don't consider pending breakpoints.
10623 (linux_resume): Start a step-over if necessary.
10624 (proceed_one_lwp): New.
10625 (proceed_all_lwps): New.
10626 (unstop_all_lwps): New.
10627 * linux-low.h (struct lwp_info): Rewrite comment for the
10628 `suspended' flag. Add the `stop_pc' field. Delete the
10629 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10630 Add `'last_resume_kind' and `need_step_over' fields.
10631 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10632 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10633 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10634 (set_raw_breakpoint_at): New.
10635 (set_breakpoint_at): Rewrite to use it.
10636 (reinsert_breakpoint_handler): Delete.
10637 (set_reinsert_breakpoint): New.
10638 (reinsert_breakpoint_by_bp): Delete.
10639 (delete_reinsert_breakpoints): New.
10640 (uninsert_breakpoint): Rewrite.
10641 (uninsert_breakpoints_at): New.
10642 (reinsert_breakpoint): Rewrite.
10643 (reinsert_breakpoints_at): New.
10644 (check_breakpoints): Rewrite.
10645 (breakpoint_here): New.
10646 (breakpoint_inserted_here): New.
10647 (check_mem_read): Adjust.
10648 * mem-break.h (breakpoints_supported, breakpoint_here)
10649 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10650 (reinsert_breakpoint_by_bp): Delete declaration.
10651 (delete_reinsert_breakpoints): Declare.
10652 (reinsert_breakpoint): Delete declaration.
10653 (reinsert_breakpoints_at): Declare.
10654 (uninsert_breakpoint): Delete declaration.
10655 (uninsert_breakpoints_at): Declare.
10656 (check_breakpoints): Adjust prototype.
10657 * server.h: Adjust include order.
10658 (struct thread_info): Declare here. Add a `last_status' field.
10660 2010-03-23 Michael Snyder <msnyder@vmware.com>
10662 * server.c (crc32): New function.
10663 (handle_query): Add handling for 'qCRC:' request.
10665 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10667 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10668 lwp had been stopped by a watchpoint.
10670 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10672 * server.h (internal_error): Declare.
10673 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10674 * utils.c (internal_error): New function.
10676 2010-03-15 Andreas Schwab <schwab@redhat.com>
10678 * configure.srv: Fix typo setting srv_regobj.
10680 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10682 * linux-low.c (fetch_register): Avoid passing a non string literal
10684 (usr_store_inferior_registers): Ditto.
10686 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10688 * linux-low.c (linux_write_memory): Bail out early if peeking
10691 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10693 * linux-low.h (struct lwp_info): New fields
10694 `stopped_by_watchpoint' and `stopped_data_address'.
10695 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10696 here, and cache them in the lwp object.
10697 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10699 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10701 (linux_stopped_by_watchpoint): Rewrite.
10702 (linux_stopped_data_address): Rewrite.
10704 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10706 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10707 switching the current inferior, not before.
10709 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10711 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10712 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10713 i386-linux.c and amd64-linux.c.
10714 (reg-i386.o): Removed.
10715 (reg-i386.c): Likewise.
10716 (reg-i386-linux.o): Likewise.
10717 (reg-i386-linux.c): Likewise.
10718 (reg-x86-64.o): Likewise.
10719 (reg-x86-64.c): Likewise.
10720 (reg-x86-64-linux.o): Likewise.
10721 (reg-x86-64-linux.c): Likewise.
10723 (i386.c): Likewise.
10724 (i386-linux.o): Likewise.
10725 (i386-linux.c): Likewise.
10726 (amd64.o): Likewise.
10727 (amd64.c): Likewise.
10728 (amd64-linux.o): Likewise.
10729 (amd64-linux.c): Likewise.
10731 * configure.srv (srv_i386_regobj): New.
10732 (srv_i386_linux_regobj): Likewise.
10733 (srv_amd64_regobj): Likewise.
10734 (srv_amd64_linux_regobj): Likewise.
10735 (srv_i386_32bit_xmlfiles): Likewise.
10736 (srv_i386_64bit_xmlfiles): Likewise.
10737 (srv_i386_xmlfiles): Likewise.
10738 (srv_amd64_xmlfiles): Likewise.
10739 (srv_i386_linux_xmlfiles): Likewise.
10740 (srv_amd64_linux_xmlfiles): Likewise.
10741 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10742 srv_xmlfiles to $srv_i386_xmlfiles.
10743 (i[34567]86-*-mingw32ce*): Likewise.
10744 (i[34567]86-*-mingw*): Likewise.
10745 (i[34567]86-*-nto*): Likewise.
10746 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10747 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10748 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10749 (x86_64-*-linux*): Likewise.
10751 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10752 (init_registers_amd64_linux): New.
10753 (x86_arch_setup): Replace init_registers_x86_64_linux with
10754 init_registers_amd64_linux.
10756 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10758 * configure.ac: Check for libdl. If it is not available link against
10759 static libthread_db.
10760 * configure: Regenerate.
10762 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10766 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10767 handing a read watchpoint.
10768 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10770 2010-02-12 Doug Evans <dje@google.com>
10772 * linux-low.c (linux_supports_tracefork_flag): Document.
10773 (linux_look_up_symbols): Add comment.
10775 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10777 * regcache.c (supply_register): Clear regcache if buf is NULL.
10779 2010-02-02 Nicolas Roche <roche@sourceware.org>
10780 Joel Brobecker <brobecker@adacore.com>
10782 * inferiors.c (find_inferior): Add function documentation.
10783 (unloaded_dll): Handle the case where the unloaded dll has not
10784 been previously registered in the dll list.
10786 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10788 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10789 (thumb2_breakpoint): New.
10790 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10792 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10794 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10795 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10798 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10800 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10802 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10804 * linux-s390-low.c (s390_collect_ptrace_register)
10805 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10807 2010-01-21 Doug Evans <dje@google.com>
10809 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10810 (PTRACE_ARG4_TYPE): New macro.
10811 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10812 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10813 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10814 (usr_store_inferior_registers): Ditto.
10815 (linux_read_memory, linux_write_memory): Ditto.
10816 (linux_test_for_tracefork): Ditto.
10818 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10819 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10821 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10823 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10826 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10828 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10829 prototype to take a regcache. Adjust.
10831 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10833 * regcache.h (struct thread_info): Forward declare.
10834 (struct regcache): New.
10835 (new_register_cache): Adjust prototype.
10836 (get_thread_regcache): Declare.
10837 (free_register_cache): Adjust prototype.
10838 (registers_to_string, registers_from_string): Ditto.
10839 (supply_register, supply_register_by_name, collect_register)
10840 (collect_register_as_string, collect_register_by_name): Ditto.
10841 * regcache.c (struct inferior_regcache_data): Delete.
10842 (get_regcache): Rename to ...
10843 (get_thread_regcache): ... this. Adjust. Switch inferior before
10844 fetching registers.
10845 (regcache_invalidate_one): Adjust.
10846 (regcache_invalidate): Fix prototype.
10847 (new_register_cache): Return the new register cache.
10848 (free_register_cache): Change prototype.
10849 (realloc_register_cache): Adjust.
10850 (registers_to_string): Change prototype to take a regcache. Adjust.
10851 (registers_from_string): Ditto.
10852 (register_data): Ditto.
10853 (supply_register): Ditto.
10854 (supply_register_by_name): Ditto.
10855 (collect_register): Ditto.
10856 (collect_register_as_string): Ditto.
10857 (collect_register_by_name): Ditto.
10858 * server.c (process_serial_event): Adjust.
10859 * linux-low.h (regset_fill_func, regset_store_func): Change
10861 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10863 * linux-low.c (get_stop_pc): Adjust.
10864 (check_removed_breakpoint): Adjust.
10865 (linux_wait_for_event): Adjust.
10866 (linux_resume_one_lwp): Adjust.
10867 (fetch_register): Add regcache parameter. Adjust.
10868 (usr_store_inferior_registers): Ditto.
10869 (regsets_fetch_inferior_registers): Ditto.
10870 (regsets_store_inferior_registers): Ditto.
10871 (linux_fetch_registers, linux_store_registers): Ditto.
10872 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10874 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10876 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10877 prototype to take a regcache.
10878 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10879 * remote-utils.c (convert_ascii_to_int, outreg)
10880 (prepare_resume_reply): Change prototype to take a regcache.
10882 * target.h (struct target_ops) <fetch_registers, store_registers>:
10883 Change prototype to take a regcache.
10884 (fetch_inferior_registers, store_inferior_registers): Change
10885 prototype to take a regcache. Adjust.
10886 * proc-service.c (ps_lgetregs): Adjust.
10887 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10888 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10889 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10890 take a regcache. Adjust.
10891 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10892 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10893 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10894 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10895 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10896 (cris_cannot_fetch_register):
10897 (cris_breakpoint_at): Change prototype to take a regcache.
10899 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10900 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10901 to take a regcache. Adjust.
10902 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10904 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10905 take a regcache. Adjust.
10906 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10907 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10908 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10909 * linux-mips-low.c (mips_get_pc):
10910 (mips_set_pc): Change prototype to take a regcache. Adjust.
10911 (mips_reinsert_addr): Adjust.
10912 (mips_collect_register): Change prototype to take a regcache.
10914 (mips_supply_register):
10915 (mips_collect_register_32bit, mips_supply_register_32bit)
10916 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10917 (mips_store_fpregset): Ditto.
10918 * linux-ppc-low.c (ppc_supply_ptrace_register)
10919 (ppc_supply_ptrace_register): Ditto.
10920 (parse_spufs_run): Adjust.
10921 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10922 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10923 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10924 take a regcache. Adjust.
10925 * linux-s390-low.c (s390_collect_ptrace_register)
10926 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10927 (s390_set_pc): Change prototype to take a regcache. Adjust.
10928 (s390_arch_setup): Adjust.
10929 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10930 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10931 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10932 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10933 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10935 (sparc_breakpoint_at): Adjust.
10936 * linux-xtensa-low.c (xtensa_fill_gregset):
10937 (xtensa_store_gregset):
10938 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10939 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10940 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10941 prototype to take a regcache. Adjust.
10942 * win32-arm-low.c (arm_fetch_inferior_register)
10943 (arm_store_inferior_register): Change prototype to take a
10945 * win32-i386-low.c (i386_fetch_inferior_register)
10946 (i386_store_inferior_register): Change prototype to take a
10948 * win32-low.c (child_fetch_inferior_registers)
10949 (child_store_inferior_registers): Change prototype to take a
10951 (win32_wait): Adjust.
10952 (win32_fetch_inferior_registers): Change prototype to take a
10954 (win32_store_inferior_registers): Adjust.
10955 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10956 store_inferior_register>: Change prototype to take a regcache.
10958 2010-01-20 Doug Evans <dje@google.com>
10960 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10962 (linux_wait_for_event1, linux_init_signals): Ditto.
10963 (W_STOPCODE): Provide definition if missing.
10965 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10967 * linux-low.c (linux_core_of_thread): New.
10968 (compare_ints, show_process, list_threads): New.
10969 (linux_qxfer_osdata): Report threads and cores.
10970 (linux_target_op): Register linux_core_of_thread.
10971 * remote-utils.c (prepare_resume_reply): Report the core.
10972 (buffer_xml_printf): Support %d specifier.
10973 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10975 (handle_query): Handle qXfer:threads. Announce availability
10977 * target.h (struct target_ops): New field core_of_thread.
10979 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10981 * Makefile.in (clean): Remove new generated files.
10982 (reg-s390.o, reg-s390.c): Remove rules.
10983 (reg-s390x.o, reg-s390x.c): Likewise.
10984 (s390-linux32.o, s390-linux32.c): Add rules.
10985 (s390-linux64.o, s390-linux64.c): Likewise.
10986 (s390x-linux64.o, s390x-linux64.c): Likewise.
10987 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10988 * linux-s390-low.c: Include <elf.h>.
10989 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10990 (init_registers_s390): Remove prototype.
10991 (init_registers_s390x): Likewise.
10992 (init_registers_s390_linux32): Add prototype.
10993 (init_registers_s390_linux64): Likewise.
10994 (init_registers_s390x_linux64): Likewise.
10995 (s390_num_regs_3264): New define.
10996 (s390_regmap_3264): New global variable.
10997 (s390_cannot_fetch_register): Remove obsolete check.
10998 (s390_cannot_store_register): Likewise.
10999 (s390_collect_ptrace_register): Handle upper/lower register halves.
11000 (s390_supply_ptrace_register): Likewise.
11001 (s390_fill_gregset): Update to register number changes.
11002 (s390_get_hwcap): New routine.
11003 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11004 Install appropriate regmap and register set.
11006 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11008 * server.c (gdbserver_version): Update copyright year to 2010.
11009 * gdbreplay.c (gdbreplay_version): Likewise.
11011 2009-12-28 Doug Evans <dje@google.com>
11013 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11014 elf/external.h. Include <elf.h> instead but only if necessary.
11016 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11018 * linux-low.c (linux_remove_process): Remove `detaching'
11019 parameter. Don't release/detach from thread_db here.
11020 (linux_kill): Release/detach from thread_db here, ...
11021 (linux_detach): ... and here, before actually detaching.
11022 (linux_wait_1): ... and here, when a process exits.
11023 * thread-db.c (any_thread_of): New.
11024 (thread_db_free): Switch the current inferior to a thread of the
11027 2009-12-21 Doug Evans <dje@google.com>
11029 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11031 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11032 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11033 warning ifndef __NR_tkill. Move setting of errno there too.
11034 Delete unnecessary resetting of errno after syscall.
11035 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11037 * configure.ac: Check for dladdr.
11038 * config.in: Regenerate.
11039 * configure: Regenerate.
11040 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11041 (try_thread_db_load): Update.
11043 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11045 2009-12-18 Doug Evans <dje@google.com>
11047 * event-loop.c: Include unistd.h if it exists.
11049 * linux-low.c (my_waitpid): Move definition away from being in
11050 between linux_tracefork_child/linux_test_for_tracefork.
11052 * gdb_proc_service.h (psaddr_t): Fix type.
11053 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11054 signature to match glibc.
11056 2009-12-16 Doug Evans <dje@google.com>
11058 * linux-low.c (linux_read_memory): Fix argument to read.
11060 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11062 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11063 events, don't leave current_inferior pointing at null.
11065 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11067 * win32-low.c (LOG): Delete.
11068 (OUTMSG): Output to stderr.
11069 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11070 on compile time LOG macro.
11071 (win32_wait): Fix debug output.
11073 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11075 * win32-low.c (win32_add_one_solib): If the dll name is
11076 "ntdll.dll", prepend the system directory to the dll path.
11078 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11080 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11082 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11083 Vladimir Prus <vladimir@codesourcery.com>
11085 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11086 * configure.ac: Check for __mcoldfire__ and set
11087 gdb_cv_m68k_is_coldfire.
11088 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11089 reg-cf.o and reg-m68k.o.
11090 * configure: Regenerated.
11092 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11094 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11095 Pass it to thread_db_free.
11096 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11097 proper `detaching' argument to linux_remove_process.
11098 * linux-low.h (thread_db_free): Add `detaching' parameter.
11099 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11101 (thread_db_free): Add `detaching' parameter. Only
11102 call td_ta_clear_event if detaching from process.
11104 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11106 * thread-db.c (thread_db_free): Fix typo.
11108 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11111 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11113 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11115 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11116 with an i686 compiler.
11117 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11119 * configure: Rebuilt.
11121 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11125 * server.c (handle_search_memory_1): Correct read_addr initialization
11126 in loop for searching subsequent chunks.
11128 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11130 * configure.ac: New --with-libthread-db option.
11131 * thread-db.c: Allow direct dependence on libthread_db.
11132 (thread_db_free): Adjust.
11133 * config.in: Regenerate.
11134 * configure: Likewise.
11136 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11139 * thread-db.c (attach_thread): New function.
11140 (maybe_attach_thread): Return success/failure.
11141 (find_new_threads_callback): Adjust.
11142 (thread_db_find_new_threads): Loop until no new threads.
11144 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11146 * proc-service.c (ps_lgetregs): Formatting.
11148 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11150 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11151 * configure.ac: Adjust.
11152 * linux-low.h (struct process_info_private): Move members to struct
11154 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11155 * linux-low.c (linux_remove_process): Adjust.
11156 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11157 * server.c (handle_query): Move code ...
11158 (handle_monitor_command): ... here. New function.
11159 * target.h (struct target_ops): New member.
11160 * thread-db.c (struct thread_db): New.
11161 (libthread_db_search_path): New variable.
11162 (thread_db_create_event, thread_db_enable_reporting)
11163 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11164 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11165 (try_thread_db_load_1, dladdr_to_soname): New functions.
11166 (try_thread_db_load, thread_db_load_search): New functions.
11167 (thread_db_init): Search for libthread_db.
11168 (thread_db_free): New function.
11169 (thread_db_handle_monitor_command): Likewise.
11170 * config.in: Regenerate.
11171 * configure: Regenerate.
11173 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11175 * spu-low.c (spu_kill): Wait for inferior to terminate.
11176 Call clear_inferiors.
11177 (spu_detach): Call clear_inferiors.
11179 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11181 * aclocal.m4: Regenerate.
11182 * config.in: Likewise.
11183 * configure: Likewise.
11185 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11187 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11188 (parse_spufs_run): New function.
11189 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11190 (ppc_breakpoint_at): Handle SPU breakpoints.
11192 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11194 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11195 (SPUFS_MAGIC): Define.
11196 (spu_enumerate_spu_ids): New function.
11197 (linux_qxfer_spu): New function.
11198 (linux_target_ops): Install linux_qxfer_spu.
11200 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11202 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11203 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11204 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11205 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11206 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11207 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11208 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11209 (init_registers_powerpc_cell32l): Add prototype.
11210 (init_registers_powerpc_cell64l): Likewise.
11211 (ppc_arch_setup): Detect Cell/B.E. architecture.
11213 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11215 * Makefile.in (datarootdir): New variable.
11217 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11219 * linux-low.c (linux_write_memory): Update debugging output.
11220 * Makefile.in (clean): Add new descriptions.
11221 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11222 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11223 * configure.srv: Add new files for arm*-*-linux*.
11224 * linux-arm-low.c: Add new declarations.
11225 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11226 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11227 (HWCAP_VFPv3D16): New.
11228 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11229 instead of __IWMMXT__.
11230 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11231 (arm_arch_setup): New.
11232 (target_regsets): Remove #ifdef. Add VFP regset.
11233 (the_low_target): Use arm_arch_setup.
11235 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11237 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11238 the main thread again.
11240 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11242 Adding Neutrino gdbserver.
11243 * configure: Regenerated.
11244 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11245 * configure.srv (i[34567]86-*-nto*): New target.
11246 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11247 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11248 (nto_comctrl) [__QNX__]: New function.
11249 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11251 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11253 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11256 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11257 Pedro Alves <pedro@codesourcery.com>
11259 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11260 don't support CONTEXT_EXTENDED_REGISTERS.
11261 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11262 (the_low_target): Install them.
11263 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11264 failing with ERROR_PIPE_NOT_CONNECTED.
11266 2009-06-30 Doug Evans <dje@google.com>
11267 Pierre Muller <muller@ics.u-strasbg.fr>
11269 Add h/w watchpoint support to x86-linux, win32-i386.
11270 * Makefile.in (SFILES): Add i386-low.c
11271 (i386_low_h): Define.
11272 (i386-low.o): Add dependencies.
11273 (linux-x86-low.o): Add i386-low.h dependency.
11274 (win32-i386-low.o): Ditto.
11275 * i386-low.c: New file.
11276 * i386-low.h: New file.
11277 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11278 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11279 * linux-low.c (linux_add_process): Initialize arch_private.
11280 (linux_remove_process): Free arch_private.
11281 (add_lwp): Initialize arch_private.
11282 (delete_lwp): Free arch_private.
11283 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11285 * linux-low.h (process_info_private): New member arch_private.
11286 (lwp_info): New member arch_private.
11287 (linux_target_ops): New members new_process, new_thread,
11289 (ptid_of): New macro.
11290 * linux-x86-low.c: Include stddef.h, i386-low.h.
11291 (arch_process_info): New struct.
11292 (arch_lwp_info): New struct.
11293 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11294 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11295 (i386_dr_low_get_status): New function.
11296 (x86_insert_point, x86_remove_point): New functions.
11297 (x86_stopped_by_watchpoint): New function.
11298 (x86_stopped_data_address): New function.
11299 (x86_linux_new_process, x86_linux_new_thread): New functions.
11300 (x86_linux_prepare_to_resume): New function.
11301 (the_low_target): Add entries for insert_point, remove_point,
11302 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11304 * server.c (debug_hw_points): New global.
11305 (monitor_show_help): Document set debug-hw-points.
11306 (handle_query): Process "set debug-hw-points".
11307 * server.h (debug_hw_points): Declare.
11308 (paddress): Declare.
11309 * utils.c (NUMCELLS, CELLSIZE): New macros.
11310 (get_sell, xsnprintf, paddress): New functions.
11311 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11312 remove_point, stopped_by_watchpoint, stopped_data_address.
11313 * win32-i386-low.c: Include i386-low.h.
11314 (debug_reg_state): Replaces dr.
11315 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11316 (i386_dr_low_get_status): New function.
11317 (i386_insert_point, i386_remove_point): New functions.
11318 (i386_stopped_by_watchpoint): New function.
11319 (i386_stopped_data_address): New function.
11320 (i386_initial_stuff): Update.
11321 (get_thread_context,set_thread_context,i386_thread_added): Update.
11322 (the_low_target): Add entries for insert_point,
11323 remove_point, stopped_by_watchpoint, stopped_data_address.
11324 * win32-low.c (win32_insert_watchpoint): New function.
11325 (win32_remove_watchpoint): New function.
11326 (win32_stopped_by_watchpoint): New function.
11327 (win32_stopped_data_address): New function.
11328 (win32_target_ops): Add entries for insert_watchpoint,
11329 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11330 * win32-low.h (win32_target_ops): New members insert_point,
11331 remove_point, stopped_by_watchpoint, stopped_data_address.
11333 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11335 * server.c (process_serial_event): Re-return unsupported, not
11336 error, if the type isn't recognized. Re-allow supporting only
11337 insert or remove packets. Also call require_running for
11338 breakpoints. Add missing break statement to default case. Tidy.
11339 * target.h (struct target_ops): Rename insert_watchpoint to
11340 insert_point, and remove_watchpoint to remove_point.
11342 * linux-low.h (struct linux_target_ops): Likewise.
11343 * linux-low.c (linux_insert_watchpoint): Rename to ...
11344 (linux_insert_point): ... this. Adjust.
11345 (linux_remove_watchpoint): Rename to ...
11346 (linux_remove_point): ... this. Adjust.
11347 (linux_target_ops): Adjust.
11348 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11349 (cris_insert_point): ... this.
11350 (cris_remove_watchpoint): Rename to ...
11351 (cris_remove_point): ... this.
11352 (the_low_target): Adjust.
11354 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11356 * server.c (handle_v_kill): Pass signal_pid to
11357 kill_inferior if multi_process is zero.
11359 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11361 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11362 * target.h (target_ops): Comment for *_watchpoint to make it clear
11363 the functions can get types '0' and '1'.
11365 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11367 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11368 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11369 * regcache.c (get_regcache): Likewise.
11370 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11371 * win32-low.c (child_fetch_inferior_registers): Remove check for
11374 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11375 Pedro Alves <pedro@codesourcery.com>
11377 * target.h (struct target_ops) <supports_multi_process>: New
11379 (target_supports_multi_process): New.
11380 * server.c (handle_query): Even if GDB reports support, only
11381 enable multi-process if the target also supports it. Report
11382 multi-process support only if the target backend supports it.
11383 * linux-low.c (linux_supports_multi_process): New function.
11384 (linux_target_ops): Install it as target_supports_multi_process
11387 2009-05-24 Doug Evans <dje@google.com>
11389 Global renaming of find_thread_pid to find_thread_ptid.
11390 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11391 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11392 All callers updated.
11394 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11395 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11398 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11399 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11400 (linux_resume_one_lwp): Ditto.
11402 2009-05-23 Doug Evans <dje@google.com>
11404 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11405 from struct inferior_list_entry * to struct lwp_info *.
11406 All callers updated.
11408 2009-05-13 Doug Evans <dje@google.com>
11410 * linux-x86-low.c: Don't include assert.h.
11411 (x86_siginfo_fixup): Use fatal, not assert.
11412 (x86_arch_setup): Fix comment.
11414 2009-05-12 Doug Evans <dje@google.com>
11416 Biarch support for i386/amd64 gdbserver.
11417 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11418 Add linux-x86-low.c.
11419 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11420 (linux-x86-low.o): Add.
11421 * linux-x86-64-low.c: Delete.
11422 * linux-i386-low.c: Delete.
11423 * linux-x86-low.c: New file.
11424 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11426 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11428 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11429 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11430 (linux_child_pid_to_exec_file): New function.
11431 (elf_64_header_p, elf_64_file_p): New functions.
11432 (siginfo_fixup): New function.
11433 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11434 give target a chance to convert layout.
11435 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11436 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11438 2009-05-07 Doug Evans <dje@google.com>
11440 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11441 (regsets_store_inferior_registers): Ditto.
11443 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11447 * linux-low.c (must_set_ptrace_flags): Delete.
11448 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11450 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11451 `lwp->must_set_ptrace_flags' instead.
11452 (linux_wait_for_event_1): Set ptrace options here.
11453 (linux_wait_1): ... not here.
11455 2009-04-30 Doug Evans <dje@google.com>
11457 * inferiors.c (started_inferior_callback): New function.
11458 (attached_inferior_callback): New function.
11459 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11460 * server.c (print_started_pid, print_attached_pid): New functions.
11461 (detach_or_kill_for_exit): New function.
11462 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11463 * server.h (have_started_inferiors_p): Declare.
11464 (have_attached_inferiors_p): Declare.
11466 * inferiors.c (remove_process): Fix memory leak, free process.
11467 * linux-low.c (linux_remove_process): New function.
11468 (linux_kill): Call it instead of remove_process.
11469 (linux_detach, linux_wait_1): Ditto.
11471 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11473 * configure.srv: Add x86 Windows CE target.
11475 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11477 * inferiors.c (get_thread_process): Make global.
11478 * server.h (get_thread_process): Add prototype.
11479 * thread-db.c (find_one_thread): Use get_thread_process
11480 instead of current_process.
11481 (thread_db_get_tls_address): Do not crash if called when
11482 thread layer is not yet initialized.
11484 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11486 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11487 * spu-low.c (current_tid): Rename to ...
11488 (current_ptid): ... this.
11489 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11490 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11491 ptid_get_lwp (current_ptid) instead of current_tid.
11492 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11493 instead of current_tid. Use find_process_pid to verify pid
11494 argument is valid. Pass proper argument to remove_process.
11495 (spu_thread_alive): Compare current_ptid instead of current_tid.
11496 (spu_resume): Likewise.
11498 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11500 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11503 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11505 Implement the multiprocess extensions, and add linux multiprocess
11508 * server.h (ULONGEST): Declare.
11509 (struct ptid, ptid_t): New.
11510 (minus_one_ptid, null_ptid): Declare.
11511 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11512 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11513 (struct inferior_list_entry): Change `id' type from unsigned from
11515 (struct sym_cache, struct breakpoint, struct
11516 process_info_private): Forward declare.
11517 (struct process_info): Declare.
11518 (current_process): Declare.
11519 (all_processes): Declare.
11520 (initialize_inferiors): Declare.
11521 (add_thread): Adjust to use ptid_t.
11522 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11523 (add_process, remove_process, find_thread_pid): Declare.
11524 (find_inferior_id): Adjust to use ptid_t.
11525 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11526 (multi_process): Declare.
11527 (push_event): Adjust to use ptid_t.
11528 (read_ptid, write_ptid): Declare.
11529 (prepare_resume_reply): Adjust to use ptid_t.
11530 (clear_symbol_cache): Declare.
11531 * inferiors.c (all_processes): New.
11532 (null_ptid, minus_one_ptid): New.
11533 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11534 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11535 (add_thread): Change unsigned long to ptid. Remove gdb_id
11537 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11538 (gdb_id_to_thread): Rename to ...
11539 (find_thread_pid): ... this. Change unsigned long to ptid.
11540 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11541 (loaded_dll, pull_pid_from_list): Adjust.
11542 (add_process, remove_process, find_process_pid)
11543 (get_thread_process, current_process, initialize_inferiors): New.
11544 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11545 (struct target_waitstatus) <related_pid>: Ditto.
11546 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11547 return type to int.
11548 (struct target_ops) <join>: Add `pid' argument.
11549 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11550 (struct target_ops) <wait>: Add `ptid' field. Change return type
11552 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11553 (mywait): Add `ptid' argument. Change return type to ptid_t.
11554 (target_pid_to_str): Declare.
11555 * target.c (set_desired_inferior): Adjust to use ptids.
11556 (mywait): Add new `ptid' argument. Adjust.
11557 (target_pid_to_str): New.
11558 * mem-break.h (free_all_breakpoints): Declare.
11559 * mem-break.c (breakpoints): Delelete.
11560 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11561 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11562 to use per-process breakpoint list.
11563 (free_all_breakpoints): New.
11564 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11565 (symbol_cache, all_symbols_looked_up): Delete.
11567 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11569 (prepare_resume_reply): Change ptid argument's type from unsigned
11570 long to ptid_t. Adjust. Implement W;process and X;process.
11571 (free_sym_cache, clear_symbol_cache): New.
11572 (look_up_one_symbol): Adjust to per-process symbol cache. *
11573 * server.c (cont_thread, general_thread, step_thread): Change type
11575 (attached): Delete.
11576 (multi_process): New.
11577 (last_ptid): Change type to ptid_t.
11578 (struct vstop_notif) <ptid>: Change type to ptid_t.
11579 (queue_stop_reply, push_event): Change `ptid' argument's type to
11581 (discard_queued_stop_replies): Add `pid' argument.
11582 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11583 changes. Don't reference the `attached' global.
11584 (attach_inferior): Adjust to mywait interface changes.
11585 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11586 features. Handle and report "multiprocess+". Handle
11588 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11590 (handle_v_kill): New.
11591 (handle_v_stopped): Adjust to use target_pid_to_str.
11592 (handle_v_requests): Allow multiple attaches and runs when
11593 multiprocess extensions are in effect. Handle "vKill".
11594 (myresume): Adjust to use ptids.
11595 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11596 (handle_status): Adjust to discard_queued_stop_replies interface
11598 (first_thread_of, kill_inferior_callback)
11599 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11600 (main): Call initialize_inferiors. Adjust to use ptids, killing
11601 and detaching from all inferiors. Handle multiprocess packet
11603 * linux-low.h: Include gdb_proc_service.h.
11604 (struct process_info_private): New.
11605 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11606 <lwpid_of>: Use ptid_get_lwp.
11607 (get_lwp_thread): Adjust.
11608 (struct lwp_info): Add `dead' member.
11609 (find_lwp_pid): Declare.
11610 * linux-low.c (thread_db_active): Delete.
11611 (new_inferior): Adjust comment.
11612 (inferior_pid): Delete.
11613 (linux_add_process): New.
11614 (handle_extended_wait): Adjust.
11615 (add_lwp): Change unsigned long to ptid.
11616 (linux_create_inferior): Add process to processes table. Adjust
11617 to use ptids. Don't set new_inferior here.
11618 (linux_attach_lwp): Rename to ...
11619 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11620 it. Adjust to use ptids.
11621 (linux_attach_lwp): New.
11622 (linux_attach): Add process to processes table. Don't set
11624 (struct counter): New.
11625 (second_thread_of_pid_p, last_thread_of_process_p): New.
11626 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11627 multiple processes.
11628 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11629 processes. Remove process from process table.
11630 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11631 to multiple processes.
11632 (any_thread_of): New.
11633 (linux_detach): Add `pid' argument, and handle it. Remove process
11634 from processes table.
11635 (linux_join): Add `pid' argument. Handle it.
11636 (linux_thread_alive): Change unsighed long argument to ptid_t.
11637 Consider dead lwps as not being alive.
11638 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11639 threads we're not interested in.
11640 (same_lwp, find_lwp_pid): New.
11641 (linux_wait_for_lwp): Change `pid' argument's type from int to
11643 (linux_wait_for_event): Rename to ...
11644 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11645 from int to ptid_t. Adjust.
11646 (linux_wait_for_event): New.
11647 (linux_wait_1): Add `ptid' argument. Change return type to
11648 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11649 that exit from the process table.
11650 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11652 (mark_lwp_dead): New.
11653 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11654 stopping all threads, mark its main lwp as dead.
11655 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11657 (fetch_register, usr_store_inferior_registers)
11658 (regsets_fetch_inferior_registers)
11659 (regsets_store_inferior_registers, linux_read_memory)
11660 (linux_write_memory): Inline `inferior_pid'.
11661 (linux_look_up_symbols): Adjust to use per-process
11662 `thread_db_active'.
11663 (linux_request_interrupt): Adjust to use ptids.
11664 (linux_read_auxv): Inline `inferior_pid'.
11665 (initialize_low): Don't reference thread_db_active.
11666 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11667 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11668 (ps_getpid): Return the pid of the current inferior.
11669 * thread-db.c (proc_handle, thread_agent): Delete.
11670 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11672 (find_one_thread): Change argument type to ptid_t. Adjust to
11674 (maybe_attach_thread): Adjust to per-process data and ptids.
11675 (thread_db_find_new_threads): Ditto.
11676 (thread_db_init): Ditto.
11677 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11678 processes table. Adjust to use ptids.
11679 (spu_kill, spu_detach): Adjust interface. Remove process from
11681 (spu_join, spu_thread_alive): Adjust interface.
11682 (spu_wait): Adjust interface. Remove process from processes
11683 table. Adjust to use ptids.
11684 * win32-low.c (current_inferior_tid): Delete.
11685 (current_inferior_ptid): New.
11686 (debug_event_ptid): New.
11687 (thread_rec): Take a ptid. Adjust.
11688 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11689 (child_delete_thread): Ditto.
11690 (do_initial_child_stuff): Add `attached' argument. Add process to
11692 (child_fetch_inferior_registers, child_store_inferior_registers):
11694 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11695 (win32_attach): Pass 1 to do_initial_child_stuff.
11696 (win32_kill): Adjust interface. Remove process from processes
11698 (win32_detach): Ditto.
11699 (win32_join): Adjust interface.
11700 (win32_thread_alive): Take a ptid.
11701 (win32_resume): Adjust to use ptids.
11702 (get_child_debug_event): Ditto.
11703 (win32_wait): Adjust interface. Remove exiting process from
11706 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11708 Non-stop mode support.
11710 * server.h (non_stop): Declare.
11711 (gdb_client_data, handler_func): Declare.
11712 (delete_file_handler, add_file_handler, start_event_loop):
11714 (handle_serial_event, handle_target_event, push_event)
11715 (putpkt_notif): Declare.
11716 * target.h (enum resume_kind): New.
11717 (struct thread_resume): Replace `step' field by `kind' field.
11718 (TARGET_WNOHANG): Define.
11719 (struct target_ops) <wait>: Add `options' argument.
11720 <supports_non_stop, async, start_non_stop>: New fields.
11721 (target_supports_non_stop, target_async): New.
11722 (start_non_stop): Declare.
11723 (mywait): Add `options' argument.
11724 * target.c (mywait): Add `options' argument. Print child exit
11725 notifications here.
11726 (start_non_stop): New.
11727 * server.c (non_stop, own_buf, mem_buf): New globals.
11728 (struct vstop_notif): New.
11729 (notif_queue): New global.
11730 (queue_stop_reply, push_event, discard_queued_stop_replies)
11731 (send_next_stop_reply): New.
11732 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11734 (attach_inferior): In non-stop mode, don't wait for the target
11736 (handle_general_set): Handle QNonStop.
11737 (handle_query): When handling qC, return the current general
11738 thread, instead of the first thread of the list.
11739 (handle_query): If the backend supports non-stop mode, include
11740 QNonStop+ in the qSupported query response.
11741 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11743 (handle_v_attach, handle_v_run): Handle non-stop mode.
11744 (handle_v_stopped): New.
11745 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11746 (myresume): Adjust to use resume_kind. Handle non-stop.
11747 (queue_stop_reply_callback): New.
11748 (handle_status): Handle non-stop mode.
11749 (main): Clear non_stop flag on reconnection. Use the event-loop.
11750 Refactor serial protocol handling from here ...
11751 (process_serial_event): ... to this new function. When GDB
11752 selects any thread, select one here. In non-stop mode, wait until
11753 GDB acks all pending events before exiting.
11754 (handle_serial_event, handle_target_event): New.
11755 * remote-utils.c (remote_open): Install remote_desc in the event
11757 (remote_close): Remove remote_desc from the event loop.
11758 (putpkt_binary): Rename to...
11759 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11760 (putpkt_binary): New as wrapper around putpkt_binary_1.
11761 (putpkt_notif): New.
11762 (prepare_resume_reply): In non-stop mode, don't change the
11764 * event-loop.c: New.
11765 * Makefile.in (OBJ): Add event-loop.o.
11766 (event-loop.o): New rule.
11768 * linux-low.h (pid_of): Moved here.
11770 (get_lwp_thread): Use lwpid_of.
11771 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11772 * linux-low.c (pid_of): Delete.
11773 (inferior_pid): Use lwpid_of.
11774 (linux_event_pipe): New.
11775 (target_is_async_p): New.
11777 (handle_extended_wait): Use lwpid_of.
11778 (add_lwp): Don't set lwpid field.
11779 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11780 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11781 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11782 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11783 first. Adjust to linux_wait_for_event interface changes. Use
11785 (linux_detach): Don't delete the main lwp here.
11786 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11787 (status_pending_p): Don't consider explicitly suspended lwps.
11788 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11789 pointer. Add OPTIONS argument. Change return type to int. Use
11790 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11791 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11792 pointer. Add status pointer argument. Return a pid instead of a
11793 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11794 changes. In non-stop mode, don't switch to a random thread.
11795 (linux_wait): Rename to...
11796 (linux_wait_1): ... this. Add target_options argument, and handle
11797 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11798 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11799 clean exit and signal exit code. Don't stop all threads in
11800 non-stop mode. In all-stop mode, only stop all threads when
11801 reporting a stop to GDB. Handle explicit thread stop requests.
11802 (async_file_flush, async_file_mark): New.
11804 (send_sigstop): Use lwpid_of.
11805 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11806 interface changes. In non-stop mode, don't switch to a random
11808 (linux_resume_one_lwp): Use lwpid_of.
11809 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11810 (linux_resume_one_thread): ... this. Handle resume_stop. In
11811 non-stop mode, don't look for pending flag in all threads.
11812 (resume_status_pending_p): Don't consider explicitly suspended
11814 (my_waitpid): Reimplement. Emulate __WALL.
11815 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11817 (sigchld_handler, linux_supports_non_stop, linux_async)
11818 (linux_start_non_stop): New.
11819 (linux_target_ops): Register linux_supports_non_stop, linux_async
11820 and linux_start_non_stop.
11821 (initialize_low): Install SIGCHLD handler.
11822 * thread-db.c (thread_db_create_event, find_one_thread)
11823 (thread_db_get_tls_address): Use lwpid_of.
11824 * win32-low.c (win32_detach): Adjust to use resume_kind.
11825 (win32_wait): Add `options' argument.
11826 * spu-low.c (spu_resume): Adjust to use resume_kind.
11827 (spu_wait): Add `options' argument.
11829 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11831 Decouple target code from remote protocol.
11833 * target.h (enum target_waitkind): New.
11834 (struct target_waitstatus): New.
11835 (struct target_ops) <wait>: Return an unsigned long. Take a
11836 target_waitstatus pointer instead of a char pointer.
11837 (mywait): Likewise.
11838 * target.c (mywait): Change prototype to return an unsigned long.
11839 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11840 * server.h (thread_from_wait, old_thread_from_wait): Delete
11842 (prepare_resume_reply): Change prototype to take a
11844 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11845 (last_status, last_ptid): New.
11846 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11847 pid instead of a signal.
11848 (attach_inferior): Remove "status" and "signal" parameters.
11850 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11852 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11853 (handle_v_requests, myresume): Remove "status" and "signal"
11854 parameters. Adjust.
11855 (handle_status): New.
11856 (main): Delete local `status'. Adjust.
11857 * remote-utils.c: Include target.h.
11858 (prepare_resume_reply): Change prototype to take a
11859 target_waitstatus. Adjust.
11861 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11863 * spu-low.c (spu_wait): Adjust.
11864 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11866 (win32_wait): Adjust.
11868 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11870 * target.h (struct thread_resume): Delete leave_stopped member.
11871 (struct target_ops): Add a `n' argument to the `resume' callback.
11872 * server.c (start_inferior): Adjust.
11873 (handle_v_cont, myresume): Adjust.
11874 * linux-low.c (check_removed_breakpoint): Adjust to resume
11875 interface change, and to removed leave_stopped field.
11876 (resume_ptr): Delete.
11877 (struct thread_resume_array): New.
11878 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11879 resume interface change.
11880 (linux_continue_one_thread, linux_queue_one_thread)
11881 (resume_status_pending_p): Check if the resume field is NULL
11882 instead of checking the leave_stopped member.
11883 (linux_resume): Adjust to the target resume interface change.
11884 * spu-low.c (spu_resume): Adjust to the target resume interface
11886 * win32-low.c (win32_detach, win32_resume): Ditto.
11888 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11890 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11892 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11894 (linux_continue_one_thread): Only preserve the stepping flag if
11895 there's a pending breakpoint.
11897 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11899 * server.c (main): After the inferior having exited, call
11900 remote_close before exiting gdbserver.
11902 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11904 Fix size of FPSCR in Power 7 processors.
11905 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11906 (PPC_FEATURE_HAS_DFP): New #define.
11907 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11910 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11912 * server.c (handle_query) Whitespace and formatting.
11914 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11916 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11917 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11918 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11919 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11920 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11921 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11922 Makefile.in, configure.ac: Fix whitespace throughout.
11923 * configure: Regenerate.
11925 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11927 * inferiors.c (find_inferior): Make it safe for the callback
11928 function to delete the currently iterated inferior.
11930 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11932 * Makefile.in (linuw_low_h): Move higher.
11933 (thread-db.o): Depend on $(linux_low_h).
11935 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11937 Rename "process" to "lwp" throughout.
11939 * linux-low.c (all_processes): Rename to...
11940 (all_lwps): ... this.
11941 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11942 (add_process): Rename to ...
11943 (add_lwp): ... this. Adjust.
11944 (linux_create_inferior): Adjust.
11945 (linux_attach_lwp): Adjust.
11946 (linux_attach): Adjust.
11947 (linux_kill_one_process): Rename to ...
11948 (linux_kill_one_lwp): ... this. Adjust.
11949 (linux_kill): Adjust.
11950 (linux_detach_one_process): Rename to ...
11951 (linux_detach_one_lwp): ... this. Adjust.
11952 (linux_detach): Adjust.
11953 (check_removed_breakpoint): Adjust.
11954 (status_pending_p): Adjust.
11955 (linux_wait_for_process): Rename to ...
11956 (linux_wait_for_lwp): ... this. Adjust.
11957 (linux_wait_for_event): Adjust.
11958 (send_sigstop): Adjust.
11959 (wait_for_sigstop): Adjust.
11960 (stop_all_processes): Rename to ...
11961 (stop_all_lwps): ... this.
11962 (linux_resume_one_process): Rename to ...
11963 (linux_resume_one_lwp): ... this. Adjust.
11964 (linux_set_resume_request, linux_continue_one_thread)
11965 (linux_queue_one_thread, resume_status_pending_p)
11966 (usr_store_inferior_registers, regsets_store_inferior_registers)
11967 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11969 * linux-low.h (get_process): Rename to ...
11970 (get_lwp): ... this. Adjust.
11971 (get_thread_process): Rename to ...
11972 (get_thread_lwp): ... this. Adjust.
11973 (get_process_thread): Rename to ...
11974 (get_lwp_thread): ... this. Adjust.
11975 (struct process_info): Rename to ...
11976 (struct lwp_info): ... this.
11977 (all_processes): Rename to ...
11978 (all_lwps): ... this.
11979 * proc-service.c (ps_lgetregs): Adjust.
11980 * thread-db.c (thread_db_create_event, find_one_thread)
11981 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11983 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11985 * server.c (handle_query): Handle "qAttached".
11987 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11989 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11990 GPLv3, update license URL.
11992 2009-03-01 Doug Evans <dje@google.com>
11994 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11995 (server_h): Add gdb_signals.h.
11996 (signals.o): Update.
11997 * server.h (target_signal_from_host,target_signal_to_host_p)
11998 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12000 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12002 * remote-utils.c (getpkt): Also generate remote-debug
12003 information if noack_mode is set.
12005 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12007 * server.c (handle_query): Report qXfer:siginfo:read and
12008 qXfer:siginfo:write as supported and handle them.
12009 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12010 * linux-low.c (linux_xfer_siginfo): New.
12011 (linux_target_ops): Set it.
12013 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12015 * server.c (gdbserver_usage): Mention --remote-debug.
12016 (main): Accept '--remote-debug' switch.
12018 2009-01-18 Doug Evans <dje@google.com>
12020 * regcache.c (new_register_cache): No need to check result of xcalloc.
12021 * server.c (handle_search_memory): Back out calls to xmalloc,
12022 result is checked and error is returned to user upon failure.
12023 (handle_query): Ditto. Add more checks for result of malloc.
12024 (handle_v_cont): Check result of malloc, report error back to
12026 (handle_v_run): Ditto. Call freeargv.
12027 * server.h (freeargv): Declare.
12028 * utils.c (freeargv): New fn.
12030 2009-01-15 Doug Evans <dje@google.com>
12032 * gdbreplay.c (perror_with_name): Make arg const char *.
12033 * server.h (target_signal_to_name): Make return type const char *.
12034 * thread-db.c (thread_db_err_str): Make return type const char *.
12035 * utils.c (perror_with_name): Make arg const char *.
12037 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12039 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12040 when handling a EXIT_PROCESS_DEBUG_EVENT.
12042 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12044 * gdbreplay.c (gdbreplay_version): Update copyright year.
12045 * server.c (gdbserver_version): Likewise.
12047 2009-01-05 Doug Evans <dje@google.com>
12049 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12050 (handle_extended_wait): Improve comment.
12052 2008-12-13 Doug Evans <dje@google.com>
12054 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12055 * server.h (ATTR_MALLOC): New macro.
12056 (xmalloc,xcalloc,xstrdup): Declare.
12057 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12058 * inferiors.c: Ditto.
12059 * linux-low.c: Ditto.
12060 * mem-break.c: Ditto.
12061 * regcache.c: Ditto.
12062 * remote-utils.c: Ditto.
12065 * win32-low.c: Ditto.
12067 2008-12-12 Doug Evans <dje@google.com>
12069 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12070 in debugging printf.
12072 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12074 2008-12-09 Doug Evans <dje@google.com>
12076 * linux-low.h (struct process_info): Delete member tid, unused.
12077 * thread-db.c (find_one_thread): Update.
12078 (maybe_attach_thread): Update.
12080 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12082 * target.h (struct target_ops): Add qxfer_osdata member.
12083 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12085 (linux_qxfer_osdata): New functions.
12086 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12088 * server.c (handle_query): Handle "qXfer:osdata:read:".
12089 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12090 (buffer_xml_printf): New functions.
12091 * server.h (struct buffer): New.
12092 (buffer_grow_str, buffer_grow_str0): New macros.
12093 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12094 (buffer_xml_printf): Declare.
12096 2008-11-24 Doug Evans <dje@google.com>
12098 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12100 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12102 * server.c (handle_v_run): Always use the supplied argument list.
12104 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12106 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12107 (xtensa_regmap_table): Add entry for scompare1.
12109 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12111 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12112 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12113 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12114 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12115 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12116 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12117 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12118 XML target descriptions.
12119 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12120 when inferior is running on an ISA 2.05 or later processor. Add
12121 special case to return offset for full 64-bit slot of FPSCR when
12124 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12126 * Makefile.in (SFILES, clean): Added sparc64 files.
12127 (reg-sparc64.o, reg-sparc64.c): New.
12128 * configure.srv (sparc*-*-linux*): New configuration.
12129 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12130 syscall arguments for SPARC.
12131 (regsets_store_inferior_registers): Likewise.
12132 * linux-sparc-low.c: New file.
12134 2008-10-21 Doug Evans <dje@google.com>
12136 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12137 (READLINE_DIR,READLINE_DEP): Delete.
12138 (INTERNAL_CFLAGS): Update.
12139 (LINTFLAGS): Update.
12141 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12143 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12144 whole argv from the last run, not just argv[0].
12146 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12148 * regcache.c (new_register_cache): Return NULL if the register
12149 cache size isn't known yet.
12150 (free_register_cache): Avoid dereferencing a NULL regcache.
12152 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12154 * configure.srv: Merge MIPS and MIPS64.
12156 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12158 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12160 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12162 * Makefile.in: Add required vsx dependencies.
12164 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12165 Declare init_registers_powerpc_vsx32l.
12166 Declare init_registers_powerpc_vsx64l.
12167 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12168 (ppc_arch_setup): Check for VSX in hwcap.
12169 (ppc_fill_vsxregset): New function.
12170 (ppc_store_vsxregset): New function.
12171 Add new VSX entry in regset_info target_regsets.
12173 * configure.srv: Add new VSX dependencies.
12175 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12177 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12178 (remote_open): Set or clear transport_is_reliable.
12179 (putpkt_binary): Don't expect acks in noack mode.
12180 (getpkt): Don't send ack/nac in noack mode.
12181 * server.c (handle_general_set): Handle QStartNoAckMode.
12182 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12184 (main): Reset noack_mode on every connection.
12185 * server.h (noack_mode): Declare.
12187 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12189 * Makefile.in (GDBREPLAY_OBS): New variable.
12190 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12192 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12193 Daniel Jacobowitz <dan@codesourcery.com>
12195 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12196 (usr_store_inferior_registers): Likewise.
12197 (regsets_store_inferior_registers): Likewise.
12199 2008-07-31 Rolf Jansen <rj@surtec.com>
12200 Pedro Alves <pedro@codesourcery.com>
12202 * configure.ac: Check for memmem declaration.
12203 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12204 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12205 (disable_packet_qfThreadInfo): Unconditionally compile.
12206 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12207 * configure, config.in: Regenerate.
12209 2008-07-28 Doug Kwan <dougkwan@google.com>
12211 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12212 (linux_write_memory): Remove declaration of errno.
12214 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12216 * linux-low.c (handle_extended_wait): Do not use "status"
12217 variable uninitialized.
12219 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12221 * server.c (handle_v_attach): Inhibit reporting dll changes.
12223 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12225 * remote-utils.c (prepare_resume_reply): If requested, don't
12226 output "thread:TID" in the T stop reply.
12228 * server.c (disable_packet_vCont, disable_packet_Tthread)
12229 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12230 (handle_query): If requested, disable support for qC, qfThreadInfo
12232 (handle_v_requests): If requested, disable support for vCont.
12233 (gdbserver_show_disableable): New.
12234 (main): Handle --disable-packet and --disable-packet=LIST.
12236 * server.h (disable_packet_vCont, disable_packet_Tthread)
12237 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12239 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12241 * server.c (gdbserver_usage): Mention --version.
12243 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12245 * Makefile.in (gdbreplay.o): New rule.
12247 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12249 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12250 message, not gdbserver.
12252 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12253 Nathan Sidwell <nathan@codesourcery.com>
12254 Joseph Myers <joseph@codesourcery.com>
12256 * acinclude.m4: Include ../../config/acx.m4.
12257 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12258 * configure, config.in: Regenerate.
12259 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12260 * server.c (gdbserver_version): Print PKGVERSION.
12261 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12262 (main): Adjust gdbserver_usage calls.
12263 * gdbreplay.c (version, host_name): Add declarations.
12264 (gdbreplay_version, gdbreplay_usage): New.
12265 (main): Accept --version and --help options.
12267 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12269 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12270 (arm_breakpoint_at): Handle Thumb.
12271 (the_low_target): Add comment.
12273 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12275 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12277 2008-05-09 Doug Evans <dje@google.com>
12279 * server.h (decode_search_memory_packet): Declare.
12280 * remote-utils.c (decode_search_memory_packet): New fn.
12281 * server.c (handle_search_memory_1): New fn.
12282 (handle_search_memory): New fn.
12283 (handle_query): Process qSearch:memory packets.
12285 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12287 * regcache.c (registers_length): Remove.
12288 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12289 full register packet.
12290 * regcache.h (registers_length): Remove prototype.
12291 * server.h (PBUFSIZ): Define to 16384.
12293 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12295 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12296 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12297 powerpc-64l.o, and powerpc-altivec64l.o.
12298 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12299 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12300 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12301 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12302 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12305 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12306 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12307 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12308 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12309 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12310 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12311 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12312 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12313 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12314 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12317 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12318 (init_registers_powerpc_32l): ... this new prototype.
12319 (init_registers_powerpc_32): Remove, replace by ...
12320 (init_registers_powerpc_altivec32l): ... this new prototype.
12321 (init_registers_powerpc_e500): Remove, replace by ...
12322 (init_registers_powerpc_e500l): ... this new prototype.
12323 (init_registers_ppc64): Remove, replace by ...
12324 (init_registers_powerpc_64l): ... this new prototype.
12325 (init_registers_powerpc_64): Remove, replace by ...
12326 (init_registers_powerpc_altivec64l): ... this new prototype.
12327 (ppc_num_regs): Set to 73.
12328 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12329 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12330 (ppc_cannot_store_register): Handle orig_r3 and trap.
12331 (ppc_arch_setup): Update init_registers_... calls.
12332 (ppc_fill_gregset): Handle orig_r3 and trap.
12334 * inferiors.c (clear_inferiors): Reset current_inferior.
12336 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12338 * acinclude.m4: Add override.m4.
12339 * configure: Regenerate.
12341 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12343 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12344 initial call to init_register_ppc64.
12346 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12348 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12349 single powerpc*-*-linux* case.
12350 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12352 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12354 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12355 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12357 * linux-ppc-low.c: Include <elf.h>.
12358 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12359 (ppc_hwcap): New global variable.
12360 (ppc_regmap): Remove __SPE__ #ifdef sections.
12361 (ppc_regmap_e500): New global variable.
12362 (ppc_cannot_store_register): Update __SPE__ special case.
12363 (ppc_get_hwcap): New function.
12364 (ppc_arch_setup): Use it to determine whether inferior supports
12365 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12366 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12367 Do not access registers if target does not support AltiVec.
12368 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12369 Do not access registers if target does not support SPE.
12370 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12372 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12374 * linux-low.c (disabled_regsets, num_regsets): New.
12375 (use_regsets_p): Delete.
12376 (linux_wait_for_process): Clear disabled_regsets.
12377 (regsets_fetch_inferior_registers): Check and set it.
12378 (regsets_store_inferior_registers): Likewise.
12379 (linux_fetch_registers, linux_store_registers): Do not use
12381 (initialize_low): Allocate disabled_regsets.
12383 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12385 * Makefile.in (LIBOBJS): New.
12386 (OBS): Use LIBOBJS.
12387 (memmem.o): New rule.
12388 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12389 * configure: Regenerated.
12391 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12393 * server.c (handle_query): Never return "unsupported" for
12394 qXfer:features:read queries.
12396 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12398 * server.c (get_features_xml): Fix inverted condition.
12399 (handle_query): Always support qXfer:feature:read.
12401 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12403 * server.c (wrapper_argv): New.
12404 (start_inferior): Handle wrapper_argv. If set, expect an extra
12406 (gdbserver_usage): Document --wrapper.
12407 (main): Parse --wrapper.
12409 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12411 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12412 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12413 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12414 (ppc_set_pc): Likewise.
12415 (ppc_arch_setup): New function.
12416 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12417 of collect_register.
12418 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12420 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12422 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12423 instead of linux-ppc64-low.o.
12424 * linux-ppc64-low.c: Remove file.
12425 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12426 (linux-ppc64-low.o): Remove rule.
12428 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12429 (init_registers_powerpc_64): Likewise.
12430 (ppc_regmap): Conditionally define depending on __powerpc64__.
12431 (ppc_cannot_store_register): Do not special-case "fpscr" when
12432 compiled on __powerpc64__.
12433 (ppc_collect_ptrace_register): New function.
12434 (ppc_supply_ptrace_register): New function.
12435 (ppc_breakpoint): Change type to "unsigned int".
12436 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12437 (the_low_target): Conditionally provide initializers for the
12438 arch_setup member depending on __powerpc64__. Install
12439 collect_ptrace_register and supply_ptrace_register members.
12441 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12443 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12444 * server.c (gdbserver_xmltarget): Define.
12445 (get_features_xml): Use it to replace "target.xml" and arch_string.
12447 * configure.srv: Remove srv_xmltarget. Add XML files that were
12448 mentioned there to srv_xmlfiles instead. Remove conditional tests
12449 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12450 srv_xmlfiles and srv_regobj to include all possible choices.
12451 * configure.ac (srv_xmltarget): Remove.
12452 (srv_xmlfiles): Do not add "target.xml".
12453 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12454 checks for supplementary target information.
12455 * configure: Regenerate.
12456 * Makefile.in (XML_TARGET): Remove.
12457 (target.xml): Remove rule.
12458 (clean): Do not clean up target.xml.
12459 (.PRECIOUS): Do not mention target.xml.
12461 * target.h (struct target_ops): Remove arch_string member.
12462 * linux-low.c (linux_arch_string): Remove.
12463 (linux_target_ops): Remove arch_string initializer.
12464 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12465 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12466 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12467 * spu-low.c (spu_arch_string): Remove.
12468 (spu_target_ops): Remove arch_string initializer.
12469 * win32-low.c (win32_arch_string): Remove.
12470 (win32_target_ops): Remove arch_string initializer.
12471 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12472 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12473 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12475 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12477 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12478 by collect_ptrace_register and supply_ptrace_register hooks.
12479 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12480 instead of checking for the_low_target.left_pad_xfer.
12481 (usr_store_inferior_registers): Use collect_ptrace_register callback
12482 instead of checking for the_low_target.left_pad_xfer.
12484 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12485 (s390_supply_ptrace_register): Likewise.
12486 (s390_fill_gregset): Call s390_collect_ptrace_register.
12487 (the_low_target): Update.
12489 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12490 (ppc_supply_ptrace_register): Likewise.
12491 (the_low_target): Update.
12493 * linux-i386-low.c (the_low_target): Update.
12494 * linux-x86-64-low.c (the_low_target): Update.
12496 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12498 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12499 reg-s390.o and reg-s390x.o.
12501 * linux-low.c (new_inferior): New global variable.
12502 (linux_create_inferior, linux_attach): Set it.
12503 (linux_wait_for_process): Call the_low_target.arch_setup after the
12504 target has stopped for the first time.
12505 (initialize_low): Do not call the_low_target.arch_setup.
12507 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12508 (s390_set_pc): Likewise.
12509 (s390_arch_setup): New function.
12510 (the_low_target): Use s390_arch_setup as arch_setup routine.
12512 * regcache.c (realloc_register_cache): New function.
12513 (set_register_cache): Call it for each existing regcache.
12515 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12517 * server.h (init_registers): Remove prototype.
12519 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12520 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12521 instead of init_registers ().
12522 * linux-arm-low.c (init_registers_arm): Add prototype.
12523 (init_registers_arm_with_iwmmxt): Likewise.
12524 (the_low_target): Add initializer for arch_setup field.
12525 * linux-cris-low.c (init_registers_cris): Add prototype.
12526 (the_low_target): Add initializer for arch_setup field.
12527 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12528 (the_low_target): Add initializer for arch_setup field.
12529 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12530 (the_low_target): Add initializer for arch_setup field.
12531 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12532 (the_low_target): Add initializer for arch_setup field.
12533 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12534 (the_low_target): Add initializer for arch_setup field.
12535 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12536 (the_low_target): Add initializer for arch_setup field.
12537 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12538 (init_registers_mips64_linux): Likewise.
12539 (the_low_target): Add initializer for arch_setup field.
12540 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12541 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12542 (the_low_target): Add initializer for arch_setup field.
12543 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12544 (init_registers_powerpc_64): Likewise.
12545 (the_low_target): Add initializer for arch_setup field.
12546 * linux-s390-low.c (init_registers_s390): Add prototype.
12547 (init_registers_s390x): Likewise.
12548 (the_low_target): Add initializer for arch_setup field.
12549 * linux-sh-low.c (init_registers_sh): Add prototype.
12550 (the_low_target): Add initializer for arch_setup field.
12551 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12552 (the_low_target): Add initializer for arch_setup field.
12553 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12554 (the_low_target): Add initializer for arch_setup field.
12556 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12557 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12558 instead of init_registers ().
12559 * win32-arm-low.c (init_registers_arm): Add prototype.
12560 (the_low_target): Add initializer for arch_setup field.
12561 * win32-i386-low.c (init_registers_i386): Add prototype.
12562 (the_low_target): Add initializer for arch_setup field.
12564 * spu-low.c (init_registers_spu): Add prototype.
12565 (initialize_low): Call initialie_registers_spu () instead of
12566 initialize_registers ().
12568 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12570 * server.c (handle_v_requests): When handling the vRun and vAttach
12571 packets, if already debugging a process, don't kill it. Return an
12574 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12576 * server.c (handle_query): Correct length check.
12578 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12580 * win32-low.c (do_initial_child_stuff): Add process handle
12581 parameter. Set current_process_handle and current_process_id from the
12582 parameters. Clear globals.
12583 (win32_create_inferior): Don't set current_process_handle and
12584 current_process_id here. Instead pass them on the call to
12585 do_initial_child_stuff.
12586 (win32_attach): Likewise.
12587 (win32_clear_inferiors): New.
12588 (win32_kill): Don't close the current process handle or the
12589 current thread handle here. Instead call win32_clear_inferiors.
12590 (win32_detach): Don't open a new handle to the process. Call
12591 win32_clear_inferiors.
12592 (win32_join): Don't rely on current_process_handle; open a new
12593 handle using the process id.
12594 (win32_wait): Call win32_clear_inferiors when the inferior process
12597 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12599 * server.c (monitor_show_help): Add "exit".
12601 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12603 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12604 (clean): Add reg-xtensa.c.
12605 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12606 * configure.srv (xtensa*-*-linux*) New target.
12607 * linux-xtensa-low.c: New.
12608 * xtensa-xtregs.c: New.
12610 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12612 * hostio.c: Don't include errno.h.
12613 (errno_to_fileio_errno): Move to hostio-errno.
12614 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12615 error number outputting to the target->hostio_last_error callback.
12616 (hostio_packet_error): Use FILEIO_EINVAL directly.
12617 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12618 calls to hostio_error.
12619 * hostio-errno.c: New.
12620 * server.h (hostio_last_error_from_errno): Declare.
12621 * target.h (target_ops): Add hostio_last_error member.
12622 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12623 as hostio_last_error handler.
12624 * spu-low.c (spu_target_ops): Likewise.
12625 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12626 (wince_hostio_last_error): New functions.
12627 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12628 as hostio_last_error handler.
12629 (win32_target_ops) [!_WIN32_WCE]: Register
12630 hostio_last_error_from_errno as hostio_last_error handler.
12631 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12632 (hostio-errno.o): New rule.
12633 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12634 * configure.srv (srv_hostio_err_objs): New variable. Default to
12636 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12637 * configure: Regenerate.
12639 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12641 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12642 (linux_kill, linux_detach): Clean up the process list.
12643 * remote-utils.c (remote_open): Improve port number parsing.
12644 (putpkt_binary, input_interrupt): Only send interrupts if the target
12646 * server.c (extended_protocol): Make static.
12647 (attached): Define earlier.
12648 (exit_requested, response_needed, program_argv): New variables.
12649 (target_running): New.
12650 (start_inferior): Clear attached here.
12651 (attach_inferior): Set attached here.
12652 (require_running): Define.
12653 (handle_query): Use require_running and target_running. Implement
12655 (handle_v_attach, handle_v_run): New.
12656 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12657 (gdbserver_usage): Update.
12658 (main): Redo argument parsing. Handle --debug and --multi. Handle
12659 --attach along with other options or after the port. Save
12660 program_argv. Support no initial program. Resynchronize
12661 communication with GDB after an error. Handle "monitor exit".
12662 Use require_running and target_running. Always allow the extended
12663 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12664 restart in extended mode.
12665 * README: Refer to the GDB manual. Update --attach usage.
12667 2007-12-20 Andreas Schwab <schwab@suse.de>
12669 * linux-low.c (STACK_SIZE): Define.
12670 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12671 (linux_test_for_tracefork): Likewise.
12673 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12675 * linux-low.c (linux_wait_for_event): Update messages. Do not
12676 reinsert auto-delete breakpoints.
12677 * mem-break.c (struct breakpoint): Change return type of handler to
12679 (set_breakpoint_at): Update handler type.
12680 (reinsert_breakpoint_handler): Return 1 instead of calling
12682 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12684 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12685 * mem-break.h (set_breakpoint_at): Update handler type.
12686 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12687 * win32-low.c (auto_delete_breakpoint): New.
12688 (get_child_debug_event): Use it.
12690 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12692 * configure.ac: Check for pread and pwrite.
12693 * hostio.c (handle_pread): Fall back to lseek and read.
12694 (handle_pwrite): Fall back to lseek and write.
12695 * config.in, configure: Regenerated.
12697 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12699 * server.c (myresume): Add own_buf argument.
12700 (main): Update calls.
12702 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12704 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12705 * remote-utils.c (remote_open): Do not call disable_async_io.
12706 (block_async_io): Delete.
12707 (unblock_async_io): Make static.
12708 (initialize_async_io): New.
12709 * server.c (handle_v_cont): Handle async I/O here.
12710 (myresume): Likewise. Move other common resume tasks here...
12711 (main): ... from here. Call initialize_async_io. Disable async
12712 I/O before the main loop.
12713 * server.h (initialize_async_io): Declare.
12714 (block_async_io, unblock_async_io): Delete prototypes.
12715 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12717 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12719 * remote-utils.c (readchar): Allow binary data in received messages.
12721 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12723 * win32-low.c (attaching): New global.
12724 (win32_create_inferior): Clear the `attaching' global.
12725 (win32_attach): Set the `attaching' global.
12726 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12727 attaching. Only set a breakpoint at the entry point if not
12730 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12732 * server.c (main): Don't report dll events on the initial
12733 connection on attaches.
12735 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12737 * server.c (main): Relax numerical bases supported for the pid of
12738 the --attach command line argument.
12740 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12742 * win32-low.c (win32_attach): Call OpenProcess before
12743 DebugActiveProcess, not after. Add last error output to error
12746 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12748 * win32-low.c (win32_get_thread_context)
12749 (win32_set_thread_context): New functions.
12750 (thread_rec): Use win32_get_thread_context.
12751 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12752 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12755 2007-12-03 Leo Zayas
12756 Pedro Alves <pedro_alves@portugalmail.pt>
12758 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12760 (child_add_thread): Minor cleanup.
12761 (child_continue): Resume artificially suspended threads before
12762 calling ContinueDebugEvent.
12763 (suspend_one_thread): New.
12764 (fake_breakpoint_event): New.
12765 (get_child_debug_event): Change return type to int. Check here if
12766 gdb sent an interrupt request. If a soft interrupt was requested,
12767 fake a breakpoint event. Return 0 if there is no event to handle,
12769 (win32_wait): Don't check here if gdb sent an interrupt request.
12770 Ensure there is a valid event to handle.
12771 (win32_request_interrupt): Add soft interruption method as last
12774 2007-12-03 Leo Zayas
12775 Pedro Alves <pedro_alves@portugalmail.pt>
12777 * win32-low.h (win32_thread_info): Add descriptions to the
12778 structure members. Replace `suspend_count' counter by a
12780 * win32-low.c (thread_rec): Update condition of when to get the
12781 context from the inferior. Rely on ContextFlags being set if it
12782 has already been retrieved. Only suspend the inferior thread if
12783 we haven't already. Warn if that fails.
12784 (continue_one_thread): s/suspend_count/suspended/. Only call
12785 ResumeThread once. Warn if that fails.
12787 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12789 * win32-low.c (win32_wait): Don't read from the inferior when it
12790 has already exited.
12792 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12794 * Makefile.in (win32_low_h): New variable.
12795 (win32-low.o): Add dependency on $(win32_low_h).
12796 (win32-arm-low.o, win32-i386-low.o): New rules.
12798 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12800 * hostio.c: Correct copyright year.
12802 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12804 * Makefile.in (OBS): Add hostio.o.
12805 (hostio.o): New rule.
12806 * server.h (handle_vFile): Declare.
12807 * hostio.c: New file.
12808 * server.c (handle_v_requests): Take packet_len and new_packet_len
12809 for binary packets. Call handle_vFile.
12810 (main): Update call to handle_v_requests.
12812 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12814 * linux-low.c: Include <sched.h>.
12816 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12818 * linux-low.c (linux_tracefork_grandchild): New.
12819 (linux_tracefork_child): Use clone.
12820 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12822 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12824 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12826 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12828 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12830 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12832 * inferiors.c (change_inferior_id): Delete.
12833 (add_pid_to_list, pull_pid_from_list): New.
12834 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12835 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12836 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12837 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12838 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12839 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12840 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12841 (using_threads): Always set to 1.
12842 (handle_extended_wait): New.
12843 (add_process): Do not set TID.
12844 (linux_create_inferior): Set must_set_ptrace_flags.
12845 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12846 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12847 (linux_thread_alive): Rename TID argument to LWPID.
12848 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12849 (linux_wait_for_event): Do not use TID or check using_threads. Update
12850 call to dead_thread_notify. Call handle_extended_wait.
12851 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12852 (send_sigstop): Delete sigstop_sent.
12853 (wait_for_sigstop): Avoid TID.
12854 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12855 (linux_test_for_tracefork): New.
12856 (linux_lookup_signals): Use thread_db_active and
12857 linux_supports_tracefork_flag.
12858 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12859 * linux-low.h (get_process_thread): Avoid TID.
12860 (struct process_ifo): Move thread_known and tid to the end. Remove
12862 (linux_attach_lwp, thread_db_init): Update prototypes.
12863 * server.h (change_inferior_id): Delete prototype.
12864 (add_pid_to_list, pull_pid_from_list): New prototypes.
12865 * thread-db.c (thread_db_use_events): New.
12866 (find_first_thread): Rename to...
12867 (find_one_thread): ...this. Update callers and messages. Do not
12868 call fatal. Check thread_db_use_events. Do not call
12869 change_inferior_id or new_thread_notify.
12870 (maybe_attach_thread): Update. Do not call new_thread_notify.
12871 (thread_db_init): Set thread_db_use_events. Check use_events.
12872 * utils.c (fatal, warning): Correct message prefix.
12874 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12876 * Makefile.in (clean): Remove new files.
12877 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12878 (powerpc-64.o, powerpc-64.c): New rules.
12879 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12880 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12882 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12884 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12885 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12886 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12887 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12888 (target_regsets): Add AltiVec and SPE register sets.
12889 * configure.ac: Check for AltiVec and SPE.
12890 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12891 (ppc_fill_vrregset, ppc_store_vrregset): New.
12892 (target_regsets): Add AltiVec register set.
12893 * configure: Regenerated.
12895 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12897 * linux-low.c (O_LARGEFILE): Define.
12898 (linux_read_memory): Use /proc/PID/mem.
12899 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12900 * configure, config.in: Regenerated.
12902 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12904 * linux-low.c (linux_wait_for_event): Do not pass signals while
12907 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12909 * win32-low.c (create_process): New.
12910 (win32_create_inferior): Use create_process instead of
12911 CreateProcess. If create_process failed retry appending an ".exe"
12912 suffix. Store the GetLastError result immediatelly after
12913 create_process calls and use it on the call to error.
12915 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12917 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12919 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12921 * configure.ac: Switch license to GPLv3.
12923 2007-08-01 Michael Snyder <msnyder@access-company.com>
12925 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12927 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12929 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12931 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12932 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12933 CloseToolhelp32Snapshot.
12934 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12935 CloseToolhelp32Snapshot.
12937 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12939 * server.c (main): Check for inferior exit before main loop.
12941 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12943 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12944 instead of on tmp_desc.
12946 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12947 Daniel Jacobowitz <dan@codesourcery.com>
12949 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12950 (add_thread): Minor cleanups.
12951 (clear_inferiors): Move lower in the file. Clear the DLL
12953 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12954 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12955 (xml_escape_text): New.
12956 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12958 (handle_v_cont): Report errors.
12959 (gdbserver_version): Update.
12960 (main): Correct size of own_buf. Do not report initial DLL events.
12961 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12962 (unloaded_dll, xml_escape_text): New.
12963 * win32-low.c (enum target_waitkind): Update comments.
12964 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12965 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12966 (win32_EnumProcessModules, win32_GetModuleInformation)
12967 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12968 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12969 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12970 (win32_Module32First, win32_Module32Next, load_toolhelp)
12971 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12972 (get_child_debug_event): Handle DLL events.
12973 (win32_wait): Likewise.
12975 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12977 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12978 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12980 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12982 * win32-low.c (handle_output_debug_string): Ignore event if not
12985 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12987 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12989 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12991 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12993 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12995 * inferiors.c (change_inferior_id): Add comment.
12996 * linux-low.c (check_removed_breakpoint): Add an early
12997 prototype. Improve debug output.
12998 (linux_attach): Doc update.
12999 (linux_detach_one_process, linux_detach): Clean up before releasing
13001 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13002 * linux-low.h (struct process_info): Doc improvement.
13003 * mem-break.c (delete_all_breakpoints): New.
13004 * mem-break.h (delete_all_breakpoints): New prototype.
13005 * thread-db.c (find_first_thread): New.
13006 (thread_db_create_event): Call it instead of
13007 thread_db_find_new_threads. Clean up unused variables.
13008 (maybe_attach_thread): Remove first thread handling.
13009 (thread_db_find_new_threads): Use find_first_thread.
13010 (thread_db_get_tls_address): Likewise.
13012 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13014 * thread-db.c (thread_db_find_new_threads): Add prototype.
13015 (thread_db_create_event): Check for the main thread before adding
13017 (maybe_attach_thread): Only enable event reporting if TID == 0.
13018 (thread_db_get_tls_address): Check for new threads.
13020 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13022 * linux-low.c (linux_create_inferior): Try execv before execvp.
13023 * spu-low.c (spu_create_inferior): Likewise.
13025 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13027 * linux-low.c (linux_create_inferior): Change execv to execvp.
13028 * spu-low.c (spu_create_inferior): Likewies.
13030 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13032 * Makefile.in (clean): Clean new files instead of deleted ones.
13033 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13034 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13036 * configure.srv: Specify XML files and new regformats for MIPS and
13038 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13039 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13040 an entry for the restart register.
13041 (mips_cannot_fetch_register, mips_cannot_store_register)
13042 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13043 register names to match the XML descriptions.
13044 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13045 restart register instead of $0.
13047 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13048 Markus Deuling <deuling@de.ibm.com>
13050 * remote-utils.c (decode_xfer_write): New function.
13051 * server.h (decode_xfer_write): Add prototype.
13052 * server.c (handle_query): Add PACKET_LEN argument. Support
13053 qXfer:spu:read and qXfer:spu:write packets.
13054 (main): Pass packet_len to handle_query.
13055 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13056 * target.h (target_ops): Add qxfer_spu.
13058 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13060 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13061 accessing non-seekable spufs files.
13063 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13065 * server.c (handle_query): Add reply for qC packet.
13067 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13068 Leo Zayas <lerele@champenstudios@com>
13070 * server.h (check_remote_input_interrupt_request): New function.
13071 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13072 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13073 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13074 (check_remote_input_interrupt_request): New function.
13075 * server.h (check_remote_input_interrupt_request): Declare.
13076 * win32-low.c (winapi_DebugBreakProcess,
13077 winapi_GenerateConsoleCtrlEvent): New typedefs.
13078 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13080 (win32_wait): Check for remote interrupt request
13081 with check_remote_input_interrupt_request.
13082 (win32_request_interrupt): New function.
13083 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13085 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13087 * win32-low.c (debug_registers_changed,
13088 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13089 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13090 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13091 (thread_rec): Get context using the low target.
13092 (child_add_thread): Call thread_added on the low target,
13093 which does the same thing.
13095 (do_initial_child_stuff): Remove debug registers references.
13096 Set context using the low target. Resume threads after
13097 setting the contexts.
13098 (child_continue): Remove dead variable. Remove debug
13099 registers references.
13100 (child_fetch_inferior_registers): Go through the low target.
13101 (do_child_store_inferior_registers): Remove.
13102 (child_store_inferior_registers): Go through the low target.
13103 (win32_resume): Remove debug registers references.
13104 Set context using the low target.
13105 (handle_exception): Change return type to void. Don't record
13106 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13107 first chance exception.
13108 (get_child_debug_event): Change return type to void. Remove
13109 goto loop. Always return after waiting for debug event.
13110 (win32_wait): Convert to switch statement. Handle spurious
13113 * win32-i386-low.c (debug_registers_changed,
13114 debug_registers_used): New.
13115 (initial_stuff): Rename to ...
13116 (i386_initial_stuff): ... this. Clear debug registers
13118 (store_debug_registers): Delete.
13119 (i386_get_thread_context): New.
13120 (load_debug_registers): Delete.
13121 (i386_set_thread_context): New.
13122 (i386_thread_added): New.
13123 (single_step): Rename to ...
13124 (i386_single_step): ... this.
13125 (do_fetch_inferior_registers): Rename to ...
13126 (i386_fetch_inferior_register): ... this.
13127 (i386_store_inferior_register): New.
13128 (the_low_target): Adapt to new interface.
13130 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13131 (arm_get_thread_context): New.
13132 (arm_set_thread_context): New.
13134 (do_fetch_inferior_registers): Rename to ...
13135 (arm_fetch_inferior_register): ... this.
13136 (arm_store_inferior_register): New.
13137 (arm_wince_breakpoint): Reimplement as unsigned long.
13138 (arm_wince_breakpoint_len): Define.
13139 (the_low_target): Adapt to new interface.
13141 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13142 load_debug_registers. Add get_thread_context, set_thread_context,
13143 thread_added and store_inferior_register. Rename
13144 fetch_inferior_registers to fetch_inferior_register.
13145 (regptr): Remove declaration.
13147 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13149 * linux-low.c (linux_detach): Change return type to int. Return 0.
13150 * spu-low.c (spu_detach): Likewise.
13152 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13154 * target.h (target_ops): Change return type of detach to int.
13156 (join_inferior): New.
13157 * server.c (main): Don't skip detach support on mingw32.
13158 If the inferior doesn't support detaching return error.
13159 Call join_inferior instead of using waitpid.
13160 * linux-low.c (linux_join): New.
13161 (linux_target_op): Add linux_join.
13162 * spu-low.c (spu_join): New.
13163 (spu_target_ops): Add spu_join.
13164 * win32-low.c (win32_detach): Adapt to new interface.
13165 Reopen current_process_handle before detaching. Issue a child
13166 resume before detaching.
13168 (win32_target_op): Add win32_join.
13170 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13172 * win32-low.c (win32-attach): Fix return value.
13173 * target.h (target_ops): Describe ATTACH return values.
13175 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13177 * win32-low.c (GETPROCADDRESS): Define.
13178 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13179 (winapi_DebugSetProcessKillOnExit): Likewise.
13180 (win32_create_inferior): Force usage of ansi CreateProcessA.
13181 (win32_attach): Use GETPROCADDRESS.
13182 (win32_detach): Likewise.
13184 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13186 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13188 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13190 * win32-low.c: Commit leftover changes from 2007-03-29.
13192 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13194 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13195 fields short instead of int. Add explicit padding.
13196 (i387_cache_to_fsave): Remove unnecessary casts.
13197 (i387_fsave_to_cache): Doc fix.
13198 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13200 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13202 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13203 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13205 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13207 * configure.srv (arm*-*-mingw32ce*): Move near the other
13210 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13212 * configure.ac: Add errno checking.
13213 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13214 sys/file.h and malloc.h.
13215 (AC_CHECK_DECLS): Add perror.
13216 (srv_mingwce): Handle.
13217 * configure.srv (i[34567]86-*-cygwin*): Add
13218 win32-i386-low.o to srv_tgtobj.
13219 (i[34567]86-*-mingw*): Likewise.
13220 (arm*-*-mingw32ce*): Add case.
13221 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13222 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13223 [__MINGW32CE__] (strerror): New function.
13224 [__MINGW32CE__] (errno): Define to GetLastError.
13225 [__MINGW32CE__] (COUNTOF): New macro.
13226 (remote_open): Remove extra close call.
13227 * mem-break.c (delete_breakpoint_at): New function.
13228 * mem-break.h (delete_breakpoint_at): Declare.
13229 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13230 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13231 [USE_WIN32API] (read, write): Add char* casts.
13232 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13233 * server.h: Include wincecompat.h on Windows CE.
13234 [HAVE_ERRNO_H]: Check.
13235 (perror): Declare if not declared.
13236 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13237 (perror_with_name): Remove errno declaration.
13238 * wincecompat.h: New.
13239 * wincecompat.c: New.
13240 * win32-low.h: New.
13241 * win32-arm-low.c: New.
13242 * win32-i386-low.c: New.
13243 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13244 (OUTMSG2): Make it safe.
13246 (COUNTOF): New macro.
13247 (NUM_REGS): Get it from the low target.
13248 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13249 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13250 (thread_rec): Let low target handle debug registers.
13251 (child_add_thread): Likewise.
13252 (child_init_thread_list): Likewise.
13253 (continue_one_thread): Likewise.
13255 (do_child_fetch_inferior_registers): Move to ...
13256 * win32-i386-low.c: ... here, and rename to ...
13257 (do_fetch_inferior_registers): ... this.
13258 * win32-low.c (child_fetch_inferior_registers):
13259 Go through the low target.
13260 (do_child_store_inferior_registers): Use regptr.
13261 (strwinerror): New function.
13262 (win32_create_inferior): Handle Windows CE.
13263 Use strwinerror instead of strerror on Windows error
13264 codes. Add program to the error output.
13265 Don't close the main thread handle on Windows CE.
13266 (win32_attach): Use coredll.dll on Windows CE.
13267 (win32_kill): Close current process and current
13269 (win32_detach): Use coredll.dll on Windows CE.
13270 (win32_resume): Let low target handle debug registers, and
13272 (handle_exception): Add/Remove initial breakpoint. Avoid
13273 non-existant WSTOPSIG on Windows CE.
13274 (win32_read_inferior_memory): Cast to remove warning.
13275 (win32_arch_string): Go through the low target.
13276 (initialize_low): Call set_breakpoint_data with the low
13277 target's breakpoint.
13278 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13279 FOP_REGNUM, mappings): Move to ...
13280 * win32-i386-low.c: ... here.
13281 * win32-low.c (win32_thread_info): Move to ...
13282 * win32-low.h: ... here.
13283 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13284 win32-arm-low.c and wincecompat.c.
13285 (all:): Add $EXEEXT.
13286 (install-only:): Likewise.
13287 (gdbserver:): Likewise.
13288 (gdbreplay:): Likewise.
13289 * config.in: Regenerate.
13290 * configure: Regenerate.
13292 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13294 * win32-low.c: Rename typedef thread_info to
13295 win32_thread_info throughout.
13297 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13299 * win32-i386-low.c: Rename to ...
13300 * win32-low.c: ... this.
13301 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13302 * Makefile.in: Likewise.
13304 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13306 * remote-utils.c (monitor_output): Constify msg parameter.
13307 * server.h (monitor_output): Likewise.
13308 * win32-i386-low.c (handle_output_debug_string): New.
13309 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13310 handle_output_debug_string.
13311 (get_child_debug_event): Likewise.
13313 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13315 * server.c (main): Correct strtoul check.
13317 2007-03-27 Jon Ringle <jon@ringle.org>
13319 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13321 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13323 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13325 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13327 * terminal.h: Check HAVE_SGTTY_H.
13329 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13331 * remote-utils.c (remote_open): Print out the assigned port number.
13333 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13335 * remote-utils.c (monitor_output): New function.
13336 * server.c (debug_threads): Define here.
13337 (monitor_show_help): New function.
13338 (handle_query): Handle qRcmd.
13339 (main): Do not handle 'd' packet.
13340 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13341 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13344 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13346 * Makefile.in (EXEEXT): New.
13347 (clean): Use $(EXEEXT).
13349 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13351 * target.h (target_ops): Rename send_signal to request_interrupt,
13352 and remove enum target_signal parameter.
13353 * linux-low.c (linux_request_interrupt): Rename from
13354 linux_send_signal, and always send SIGINT.
13355 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13356 and always send SIGINT.
13357 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13359 (input_interrupt): Likewise.
13361 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13363 * server.c (get_features_xml): Check if target implemented
13365 * win32-i386-low.c (win32_arch_string): New.
13366 (win32_target_ops): Add win32_arch_string as arch_string member.
13368 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13370 * spu-low.c (spu_arch_string): New.
13371 (spu_target_ops): Add spu_arch_string.
13373 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13375 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13376 * configure.ac: Do not check for terminal.h.
13377 * configure, config.in: Regenerated.
13379 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13381 * Makefile.in (OBS): Add $(XML_BUILTIN).
13382 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13384 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13385 (arm-with-iwmmxt.c): New.
13386 * config.in, configure: Regenerate.
13387 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13388 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13389 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13390 (arm*-*-linux*): Add iWMMXt and regset support.
13391 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13392 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13393 (arm_store_wmmxregset, target_regsets): New.
13394 * server.c (get_features_xml): Take annex argument. Check builtin
13396 (handle_query): Handle multiple annexes.
13398 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13400 * remote-utils.c [USE_WIN32API] (read, write): Define.
13401 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13404 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13406 * linux-i386-low.c (the_low_target): Set arch_string.
13407 * linux-x86-64-low.c (the_low_target): Likewise.
13408 * linux-low.c (linux_arch_string): New.
13409 (linux_target_ops): Add it.
13410 * linux-low.h (struct linux_target_ops): Add arch_string.
13411 * server.c (write_qxfer_response): Use const void * for DATA.
13412 (get_features_xml): New.
13413 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13414 * target.h (struct target_ops): Add arch_string method.
13416 2007-01-03 Denis Pilat <denis.pilat@st.com>
13417 Daniel Jacobowitz <dan@codesourcery.com>
13419 * linux-low.c (linux_kill): Handle being called with no threads.
13420 * win32-i386-low.c (win32_kill): Likewise.
13421 (get_child_debug_event): Clear current_process_handle.
13423 2006-12-30 Denis PILAT <denis.pilat@st.com>
13424 Daniel Jacobowitz <dan@codesourcery.com>
13426 * remote-utils.c (remote_open): Check the type of specified
13427 serial port devices before opening them.
13428 * server.c (main): Kill the inferior if an error occurs during
13429 the first remote_open.
13431 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13433 * README: Update supported targets.
13435 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13437 * Makefile.in (clean): Remove reg-mips64.c.
13438 (reg-mips64.c, reg-mips64.o): New rules.
13439 * configure.srv: Handle mips64. Include regset support for mips.
13440 * linux-mips-low.c (union mips_register): New.
13441 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13442 (mips_breakpoint, mips_breakpoint_at): Use int.
13443 (mips_collect_register, mips_supply_register)
13444 (mips_collect_register_32bit, mips_supply_register_32bit)
13445 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13446 (mips_store_fpregset, target_regsets): New.
13447 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13449 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13451 * configure.srv: Add target "spu*-*-*".
13452 * Makefile.in (clean): Remove reg-spu.c.
13453 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13454 * spu-low.c: New file.
13456 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13458 * configure.ac: Correct td_thr_tls_get_addr test.
13459 * configure: Regenerated.
13461 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13463 * linux-low.c (linux_wait_for_event): Reformat. Use the
13464 pass_signals array.
13465 * remote-utils.c (decode_address_to_semicolon): New.
13466 * server.c (pass_signals, handle_general_set): New.
13467 (handle_query): Mention QPassSignals for qSupported.
13468 (main): Call handle_general_set.
13469 * server.h (pass_signals, decode_address_to_semicolon): New.
13471 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13473 * server.c (handle_query): Correct error handling for read_auxv.
13475 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13477 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13478 and srv_linux_thread_db to yes.
13479 * linux-s390-low.c (s390_fill_gregset): New function.
13480 (target_regsets): Define data structure.
13482 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13484 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13485 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13486 * config.in, configure: Regenerated.
13487 * inferiors.c (gdb_id_to_thread): New function.
13488 (gdb_id_to_thread_id): Use it.
13489 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13490 * linux-low.h (struct process_info): Add th member.
13491 (thread_db_get_tls_address): New prototype.
13492 * remote-utils.c (decode_address): Make non-static.
13493 * server.c (handle_query): Handle qGetTLSAddr.
13494 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13495 * target.h (struct target_ops): Add get_tls_address.
13496 * thread-db.c (maybe_attach_thread): Save the thread handle.
13497 (thread_db_get_tls_address): New.
13499 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13501 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13502 (linux_resume_one_process): Take a siginfo_t *. Update all
13503 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13504 (struct pending_signals): Add a siginfo_t.
13505 (linux_wait_for_process): Always set last_status.
13506 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13507 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13508 * linux-low.h (struct process_info): Add last_status.
13510 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13512 * remote-utils.c (try_rle): New function.
13513 (putpkt_binary): Use it.
13515 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13517 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13518 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13519 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13520 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13521 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13524 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13526 * server.c (terminal_fd): New variable.
13527 (old_foreground_pgrp): Likewise.
13528 (restore_old_foreground_pgrp): New function.
13529 (start_inferior): Record the terminal file descriptor in terminal_fd
13530 and its original foreground group in old_foreground_pgrp. Register
13531 restore_old_foreground_pgrp with atexit().
13533 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13535 * server.c (handle_query): Correct qPart to qXfer.
13537 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13539 * configure.ac: Check for more headers which are missing on
13540 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13541 * configure.srv: Add Cygwin and mingw32.
13542 * remote-utils.c: Don't include headers unconditionally which
13543 are missing on mingw32. Include <winsock.h> for mingw32.
13544 (remote_open): Adjust for mingw32 support. Flush
13545 standard error after writing to it.
13546 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13547 (unblock_async_io, enable_async_io, disable_async_io)
13548 (readchar, getpkt): Update for Winsock support.
13549 (prepare_resume_reply): Expect a protocol signal number.
13550 * server.c: Disable <sys/wait.h> on mingw32.
13551 (start_inferior): Adjust for mingw32 support. Flush
13552 standard error after writing to it.
13553 (attach_inferior): Likewise. Use protocol signal
13555 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13557 * win32-i386-low.c: New file.
13558 * Makefile.in (XM_CLIBS): Set.
13559 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13560 (win32-i386-low.o): New dependency rule.
13561 * linux-low.c (linux_wait): Use target signal numbers.
13562 * target.h (struct target_ops): Doc fix.
13563 * server.h (target_signal_to_name): New prototype.
13564 * gdbreplay.c: Don't include headers unconditionally which
13565 are missing on mingw32. Include <winsock.h> for mingw32.
13566 (remote_close, remote_open): Adjust for Winsock support.
13567 * configure, config.in: Regenerated.
13569 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13571 * server.c (decode_xfer_read, write_qxfer_response): New.
13572 (handle_query): Take a packet length argument. Handle
13573 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13574 the qSupported response.
13575 (main): Update call to handle_query.
13577 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13579 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13580 (putpkt_binary): Renamed from putpkt and adjusted for binary
13582 (putpkt): New wrapper for putpkt_binary.
13583 (readchar): Don't mask off the high bit.
13584 (decode_X_packet): New function.
13585 * server.c (main): Call putpkt_binary if a handler sets the packet
13586 length. Save the length of the incoming packet. Handle 'X'.
13587 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13589 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13591 * server.c (handle_query): Handle qSupported.
13593 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13595 * remote-utils.c (all_symbols_looked_up): New variable.
13596 (look_up_one_symbol): Check it.
13597 * server.h (look_up_one_symbol): New declaration.
13598 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13600 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13602 * Makefile.in (linux-arm-low.o): Update dependencies.
13603 * linux-arm-low.c: Include "gdb_proc_service.h".
13604 (PTRACE_GET_THREAD_AREA): Define.
13605 (ps_get_thread_area): New function.
13607 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13609 * configure.srv (m68k*-*-uclinux*): New target.
13610 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13611 (linux_resume_one_process): Remove extraneous cast.
13612 (linux_read_offsets): New.
13613 (linux_target_op): Add linux_read_offsets on mmuless systems.
13614 * server.c (handle_query): Add qOffsets logic.
13615 * target.h (struct target_ops): Add read_offsets.
13617 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13619 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13620 (PTRACE_GET_THREAD_AREA): Define.
13621 (ps_get_thread_area): New function.
13622 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13623 (linux-x86-64-low.o): Update.
13625 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13627 * configure.ac: Remove checks for prfpregset_t.
13628 * gdb_proc_service.h: New file.
13629 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13630 new "gdb_proc_service.h".
13631 * proc-service.c: Likewise.
13632 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13633 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13634 * Makefile.in (gdb_proc_service_h): Updated.
13635 * configure, config.in: Regenerated.
13637 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13639 * remote-utils.c (prepare_resume_reply): Move declaration
13640 of gdb_id_from_wait to the top of the block.
13642 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13644 * linux-low.c (regsets_store_inferior_registers): Read the regset
13645 from the target before filling it.
13647 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13649 * server.c (attach_inferior): Return SIGTRAP for a successful
13652 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13654 * Makefile.in (OBS): Add version.o.
13655 (STAGESTUFF): Delete.
13656 (version.o): Add dependencies.
13657 (version.c): Replace rule.
13658 (clean): Remove version.c.
13659 * server.c (gdbserver_version): New.
13660 (gdbserver_usage): Use printf.
13661 (main): Handle --version and --help.
13662 * server.h (version, host_name): Add declarations.
13664 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13676 * linux-x86-64-low.c:
13678 * linux-s390-low.c:
13679 * linux-ppc64-low.c:
13681 * linux-mips-low.c:
13682 * linux-m68k-low.c:
13683 * linux-m32r-low.c:
13686 * linux-ia64-low.c:
13687 * linux-i386-low.c:
13688 * linux-crisv32-low.c:
13700 * gdbserver.1: Add (C) after Copyright. Update the FSF
13703 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13705 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13706 (arm_breakpoint_at): Recognize both breakpoints.
13707 (the_low_target): Use the correct breakpoint instruction.
13709 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13711 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13712 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13713 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13714 (the_low_target): Update.
13716 2005-10-25 Andreas Schwab <schwab@suse.de>
13718 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13720 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13721 (ia64_num_regs): Reduce to 462.
13723 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13725 * acinclude.m4: Correct quoting.
13726 * aclocal.m4: Regenerated.
13728 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13729 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13730 (thread_db_init): Call thread_db_err_str.
13731 * configure.ac: Check for TD_VERSION.
13732 * config.in, configure: Regenerated.
13734 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13736 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13738 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13740 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13741 is not available. Define HAVE_PTRACE_GETREGS if it is.
13742 * config.in, configure: Regenerated.
13743 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13744 * linux-i386-low.c, linux-m68k-low.c: Update to use
13745 HAVE_PTRACE_GETREGS.
13746 * linux-low.c (regsets_fetch_inferior_registers)
13747 (regsets_store_inferior_registers): Only return 0 if we processed
13749 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13750 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13752 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13754 * inferiors.c (struct thread_info): Add gdb_id.
13755 (add_thread): Add gdb_id argument.
13756 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13757 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13758 calls to add_thread.
13759 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13760 * server.c (handle_query): Use thread_to_gdb_id.
13761 (handle_v_cont, main): Use gdb_id_to_thread_id.
13762 * server.h (add_thread): Update prototype.
13763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13766 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13768 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13769 left-padded registers.
13770 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13771 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13773 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13775 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13776 * configure: Regenerate.
13777 * config.in: Regenerate.
13778 * server.h (NEED_DECLARATION_STRERROR):
13779 Replace with !HAVE_DECL_STRERROR.
13781 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13783 * linux-low.c (linux_wait, linux_send_signal): Don't test
13784 an unsigned long variable for > 0 if it could be MAX_ULONG.
13785 * server.c (myresume): Likewise.
13786 * target.c (set_desired_inferior): Likewise.
13788 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13790 * configure.ac: Simplify and improve check for socklen_t.
13791 * configure, config.in: Regenerate.
13793 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13795 * acconfig.h: Remove.
13796 * configure.ac: Add a test for socklen_t. Use three-argument
13797 AC_DEFINE throughout.
13798 * config.in: Regenerated using autoheader 2.59.
13799 * configure: Regenerated.
13801 * gdbreplay.c (socklen_t): Provide a default.
13802 (remote_open): Use socklen_t.
13803 * remote-utils.c (socklen_t): Provide a default.
13804 (remote_open): Use socklen_t.
13805 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13808 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13810 * linux-low.c (linux_read_memory, linux_write_memory)
13811 (linux_read_auxv): Likewise.
13812 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13813 (check_mem_write): Likewise.
13814 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13816 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13817 (registers_from_string, register_data): Likewise.
13818 * server.c (handle_query, main): Likewise.
13819 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13820 (decode_M_packet): Likewise.
13821 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13822 * target.h (struct target_ops): Update read_memory, write_memory,
13824 (read_inferior_memory, write_inferior_memory): Update.
13825 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13826 to unsigned char *.
13827 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13828 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13829 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13830 linux-s390-low.c, linux-sh-low.c: Update for changes in
13831 read_inferior_memory and the_low_target->breakpoint.
13833 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13835 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13836 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13837 * configure.srv: Add powerpc64-*-linux*.
13838 * linux-ppc64-low.c: New file.
13840 2005-05-23 Orjan Friberg <orjanf@axis.com>
13842 * linux-cris-low.c: New file with support for CRIS.
13843 * linux-crisv32-low.c: Ditto for CRISv32.
13844 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13845 (clean): Add reg-cris.c and reg-crisv32.c.
13846 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13847 reg-crisv32.o, and reg-crisv32.c to make rules.
13848 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13849 recognized targets.
13851 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13853 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13854 of sizeof (PTRACE_XFER_TYPE).
13855 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13857 2005-05-12 Orjan Friberg <orjanf@axis.com>
13859 * target.h (struct target_ops): Add insert_watchpoint,
13860 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13861 pointers for hardware watchpoint support.
13862 * linux-low.h (struct linux_target_ops): Ditto.
13863 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13864 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13865 to linux_target_ops.
13866 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13868 * server.c (main): Recognize 'Z' and 'z' packets.
13870 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13872 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13873 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13874 (the_low_target): Add new members.
13876 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13878 * proc-service.c (ps_lgetregs): Search all_processes instead of
13881 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13883 * server.c (start_inferior): Change return type to int.
13884 (attach_inferior): Change sigptr to int *.
13885 (handle_v_cont, handle_v_requests): Change signal to int *.
13886 (main): Change signal to int.
13888 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13890 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13891 * configure.srv: Add m32r*-*-linux*.
13892 * linux-m32r-low.c: New file.
13894 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13896 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13898 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13900 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13901 Take unsigned long arguments for PIDs.
13902 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13903 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13904 (wait_for_sigstop, linux_resume_one_process)
13905 (regsets_fetch_inferior_registers, linux_send_signal)
13906 (linux_read_auxv): Likewise. Update the types of variables holding
13907 PIDs. Update format string specifiers.
13908 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13909 * remote-utils.c (prepare_resume_reply): Likewise.
13910 * server.c (cont_thread, general_thread, step_thread)
13911 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13913 (handle_query): Update format specifiers.
13914 (handle_v_cont, main): Use strtoul for thread IDs.
13915 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13916 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13917 (general_thread, step_thread, thread_from_wait)
13918 (old_thread_from_wait): Update.
13919 * target.h (struct thread_resume): Use unsigned long for THREAD.
13920 (struct target_ops): Use unsigned long for arguments to attach and
13923 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13925 * acinclude.m4: Include bfd/bfd.m4 directly.
13926 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13927 <agriffis@toolchain.org>.
13928 * aclocal.m4, configure: Regenerated.
13930 2005-01-07 Andrew Cagney <cagney@gnu.org>
13932 * configure.ac: Rename configure.in, require autoconf 2.59.
13933 * configure: Re-generate.
13935 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13937 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13938 LIBS when finished.
13939 * aclocal.m4: Regenerated.
13940 * configure: Regenerated.
13942 2004-11-21 Andreas Schwab <schwab@suse.de>
13944 * linux-m68k-low.c (m68k_num_gregs): Define.
13945 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13946 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13947 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13948 (m68k_breakpoint_at): New. Add to the_low_target.
13950 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13951 srv_linux_thread_db to yes.
13953 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13955 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13956 (ARCH_SET_FS): Likewise.
13957 (ARCH_GET_FS): Likewise.
13958 (ARCH_GET_GS): Likewise.
13960 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13962 * linux-i386-low.c (ps_get_thread_area): New.
13963 * linux-x86-64-low.c (ps_get_thread_area): New.
13964 * linux-low.c: Include <sys/syscall.h>.
13965 (linux_kill_one_process): Don't kill the first thread here.
13966 (linux_kill): Kill the first thread here.
13967 (kill_lwp): New function.
13968 (send_sigstop, linux_send_signal): Use it.
13969 * proc-service.c: Clean up #ifdefs.
13970 (fpregset_info): Delete.
13971 (ps_lgetregs): Update and enable implementation.
13972 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13974 * remote-utils.c (struct sym_cache, symbol_cache): New.
13975 (input_interrupt): Print a clearer message.
13976 (async_io_enabled): New variable.
13977 (enable_async_io, disable_async_io): Use it. Update comments.
13978 (look_up_one_symbol): Use the symbol cache.
13979 * thread-db.c (thread_db_look_up_symbols): New function.
13980 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13982 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13984 * configure.in: Test for -rdynamic.
13985 * configure: Regenerated.
13986 * Makefile (INTERNAL_LDFLAGS): New.
13987 (gdbserver, gdbreplay): Use it.
13989 2004-09-02 Andrew Cagney <cagney@gnu.org>
13991 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13993 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13995 * linux-low.c (linux_wait): Clear all_processes list also.
13997 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13999 * linux-low.c: Include <errno.h>. Remove extern declaration of
14002 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14004 * gdbreplay.c, server.h, utils.c: Update copyright years.
14006 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14008 * server.c (main): Print child status or termination signal from
14009 variable 'signal', not 'sig'.
14011 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14013 * linux-low.c (linux_read_memory): Change return type to
14014 int. Check for and return error from ptrace().
14015 * target.c (read_inferior_memory): Change return type to int. Pass
14016 back return status from the_target->read_memory().
14017 * target.h (struct target_ops): Adapt *read_memory() prototype.
14019 (read_inferior_memory): Adapt prototype.
14020 * server.c (main): Return an error packet if
14021 read_inferior_memory() returns an error.
14023 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14025 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14026 Unify with other clean targets.
14028 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14030 * server.c (handle_v_cont): Call set_desired_inferior.
14032 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14034 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14036 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14038 * linux-low.c (linux_wait): Unblock async I/O.
14039 (linux_resume): Block and enable async I/O.
14040 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14041 * server.h (block_async_io, unblock_async_io): Add prototypes.
14043 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14045 * remote-utils.c (remote_open): Print a status notice after
14046 opening a TCP port.
14047 * server.c (attach_inferior): Print a status notice after
14050 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14052 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14054 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14056 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14058 * server.c, target.h: Update copyright years.
14060 2004-02-25 Roland McGrath <roland@redhat.com>
14062 * target.h (struct target_ops): New member `read_auxv'.
14063 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14064 * linux-low.c (linux_read_auxv): New function.
14065 (linux_target_ops): Initialize `read_auxv' member to that.
14067 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14069 Committed by Jim Blandy <jimb@redhat.com>.
14071 * linux-s390-low.c (s390_num_regs): Update.
14072 (s390_regmap): Remove control registers. Use __s390x__ predefine
14073 instead of GPR_SIZE to distiguish s390 and s390x targets.
14075 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14077 * linux-low.c: Update copyright year.
14078 (check_removed_breakpoint): Clear pending_is_breakpoint.
14079 (linux_set_resume_request, linux_queue_one_thread)
14080 (resume_status_pending_p): New functions.
14081 (linux_continue_one_thread): Use process->resume.
14082 (linux_resume): Only resume threads if there are no pending events.
14083 * linux-low.h (struct process_info): Add resume request
14086 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14088 * regcache.c (new_register_cache): Clear the allocated register
14089 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14091 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14093 * linux-low.c (linux_resume): Take a struct thread_resume *
14095 (linux_wait): Update call.
14096 (resume_ptr): New static variable.
14097 (linux_continue_one_thread): Renamed from
14098 linux_continue_one_process. Use resume_ptr.
14099 (linux_resume): Use linux_continue_one_thread.
14100 * server.c (handle_v_cont, handle_v_requests): New functions.
14101 (myresume): New function.
14102 (main): Handle 'v' case.
14103 * target.h (struct thread_resume): New type.
14104 (struct target_ops): Change argument of "resume" to struct
14106 (myresume): Delete macro.
14108 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14110 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14111 (uninstall): Support DESTDIR.
14113 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14115 * configure.srv: Add xscale*linux copy of arm*linux entry.
14117 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14119 * linux-arm-low.c (arm_reinsert_addr): New function.
14120 (the_low_target): Add arm_reinsert_addr.
14122 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14124 * mem-break.c: Remove whitespace at end of file.
14126 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14128 * configure.in: Check whether we need to prototype strerror.
14129 * server.h: Optionally prototype strerror.
14130 * gdbreplay.c (perror_with_name): Use strerror.
14131 * linux-low.c (linux_attach_lwp): Use strerror.
14132 * utils.c (perror_with_name): Use strerror.
14133 * config.in, configure: Regenerated.
14135 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14137 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14138 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14140 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14142 * Makefile.in (SFILES): Update.
14143 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14144 low-sun3.c: Remove files.
14146 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14148 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14149 (linux_detach_one_process, linux_detach): New functions.
14150 (linux_target_ops): Add linux_detach.
14151 * server.c (main): Handle 'D' packet.
14152 * target.h (struct target_ops): Add "detach" member.
14153 (detach_inferior): Define.
14155 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14157 From Kelley Cook <kelleycook@wideopenwest.com>:
14158 * configure.srv: Accept i[34567]86 variants.
14160 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14162 * linux-low.c (linux_wait_for_event): Correct comment typos.
14163 (linux_resume_one_process): Call check_removed_breakpoint.
14164 (linux_send_signal): New function.
14165 (linux_target_ops): Add linux_send_signal.
14166 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14168 * target.h (struct target_ops): Add send_signal.
14170 2003-05-29 Jim Blandy <jimb@redhat.com>
14172 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14173 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14174 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14175 away part of the register's value.
14177 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14179 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14180 (linux_wait_for_event, linux_init_signals): Likewise.
14182 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14184 * configure.in: Check for stdlib.h.
14185 * configure: Regenerated.
14186 * config.in: Regenerated.
14188 2003-01-04 Andreas Schwab <schwab@suse.de>
14190 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14192 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14194 * Makefile.in: Remove obsolete code.
14196 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14198 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14199 defined(PT_FPR0_HI).
14201 2002-11-17 Stuart Hughes <seh@zee2.com>
14203 * linux-arm-low.c (arm_num_regs): Increase.
14204 (arm_regmap): Include status register.
14206 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14208 * linux-low.c (register_addr): Remove incorrect -1 check.
14210 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14212 * linux-low.c (linux_create_inferior): Call setpgid. Return
14214 (unstopped_p, linux_signal_pid): Remove.
14215 (linux_target_ops): Remove linux_signal_pid.
14216 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14217 global instead of target method.
14218 * target.h (struct target_ops): Remove signal_pid. Update comment
14219 for create_inferior.
14220 * server.c (signal_pid): New variable.
14221 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14222 gdbserver. Set the child to be the foreground process group.
14223 (attach_inferior): Set signal_pid.
14225 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14227 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14229 2002-08-20 Jim Blandy <jimb@redhat.com>
14231 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14234 2002-08-01 Andrew Cagney <cagney@redhat.com>
14236 * Makefile.in: Make chill references obsolete.
14238 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14240 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14241 * configure: Regenerate.
14242 * config.in: Regenerate.
14244 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14246 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14247 (perror_with_name, remote_close, remote_open, expect, play): Static.
14249 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14251 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14252 byte offsets instead of an array of indexes.
14253 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14255 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14257 * regcache.c: Add comment.
14259 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14261 * thread-db.c: New file.
14262 * proc-service.c: New file.
14263 * acinclude.m4: New file.
14264 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14265 proc-service.o, and thread-db.o.
14266 (linux-low.o): Add USE_THREAD_DB.
14267 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14268 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14269 * aclocal.m4: Regenerated.
14270 * config.in: Regenerated.
14271 * configure: Regenerated.
14272 * configure.in: Check for proc_service.h, sys/procfs.h,
14273 thread_db.h, and linux/elf.h headrs.
14274 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14275 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14276 Check for -lthread_db and thread support.
14277 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14278 PowerPC, and SuperH.
14279 * i387-fp.c: Constify arguments.
14280 * i387-fp.h: Likewise.
14281 * inferiors.c: (struct thread_info): Renamed from
14282 `struct inferior_info'. Remove PID member. Use generic inferior
14283 list header. All uses updated.
14284 (inferiors, signal_pid): Removed.
14285 (all_threads): New variable.
14286 (get_thread): Define.
14287 (add_inferior_to_list): New function.
14288 (for_each_inferior): New function.
14289 (change_inferior_id): New function.
14290 (add_inferior): Removed.
14291 (remove_inferior): New function.
14292 (add_thread): New function.
14293 (free_one_thread): New function.
14294 (remove_thread): New function.
14295 (clear_inferiors): Use for_each_inferior and free_one_thread.
14296 (find_inferior): New function.
14297 (find_inferior_id): New function.
14298 (inferior_target_data): Update argument type.
14299 (set_inferior_target_data): Likewise.
14300 (inferior_regcache_data): Likewise.
14301 (set_inferior_regcache_data): Likewise.
14302 * linux-low.c (linux_bp_reinsert): Remove.
14303 (all_processes, stopping_threads, using_thrads)
14304 (struct pending_signals, debug_threads, pid_of): New.
14305 (inferior_pid): Replace with macro.
14306 (struct inferior_linux_data): Remove.
14307 (get_stop_pc, add_process): New functions.
14308 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14309 Use add_process and add_thread.
14310 (linux_attach_lwp): New function, based on old linux_attach. Use
14311 add_process and add_thread. Set stop_expected for new threads.
14312 (linux_attach): New function.
14313 (linux_kill_one_process): New function.
14314 (linux_kill): Kill all LWPs.
14315 (linux_thread_alive): Use find_inferior_id.
14316 (check_removed_breakpoints, status_pending_p): New functions.
14317 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14318 Update. Use WNOHANG. Wait for cloned processes also. Update process
14319 struct for the found process.
14320 (linux_wait_for_event): New function.
14321 (linux_wait): Use it. Support LWPs.
14322 (send_sigstop, wait_for_sigstop, stop_all_processes)
14323 (linux_resume_one_process, linux_continue_one_process): New functions.
14324 (linux_resume): Support LWPs.
14325 (REGISTER_RAW_SIZE): Remove.
14326 (fetch_register): Use register_size instead. Call supply_register.
14327 (usr_store_inferior_registers): Likewise. Call collect_register.
14328 Fix recursive case.
14329 (regsets_fetch_inferior_registers): Improve error message.
14330 (regsets_store_inferior_registers): Add debugging.
14331 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14332 (unstopped_p, linux_signal_pid): New functions.
14333 (linux_target_ops): Add linux_signal_pid.
14334 (linux_init_signals): New function.
14335 (initialize_low): Call it. Initialize using_threads.
14336 * regcache.c (inferior_regcache_data): Add valid
14338 (get_regcache): Fetch registers lazily. Add fetch argument
14339 and update all callers.
14340 (regcache_invalidate_one, regcache_invalidate): New
14342 (new_register_cache): Renamed from create_register_cache.
14343 Return the new regcache.
14344 (free_register_cache): Change argument to a void *.
14345 (registers_to_string, registers_from_string): Call get_regcache
14346 with fetch flag set.
14347 (register_data): Make static. Pass fetch flag to get_regcache.
14348 (supply_register): Call get_regcache with fetch flag clear.
14349 (collect_register): Call get_regcache with fetch flag set.
14350 (collect_register_as_string): New function.
14351 * regcache.h: Update.
14352 * remote-utils.c (putpkt): Flush after debug output and use
14354 Handle input interrupts while waiting for an ACK.
14355 (input_interrupt): Use signal_pid method.
14356 (getpkt): Flush after debug output and use stderr.
14357 (outreg): Use collect_register_as_string.
14358 (new_thread_notify, dead_thread_notify): New functions.
14359 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14360 and general_thread.
14361 (look_up_one_symbol): Flush after debug output.
14362 * server.c (step_thread, server_waiting): New variables.
14363 (start_inferior): Don't use signal_pid. Update call to mywait.
14364 (attach_inferior): Update call to mywait.
14365 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14366 (main): Don't fetch/store registers explicitly. Use
14367 set_desired_inferior. Support proposed ``Hs'' packet. Update
14369 * server.h: Update.
14370 (struct inferior_list, struct_inferior_list_entry): New.
14371 * target.c (set_desired_inferior): New.
14372 (write_inferior_memory): Constify.
14373 (mywait): New function.
14374 * target.h: Update.
14375 (struct target_ops): New signal_pid method.
14376 (mywait): Removed macro, added prototype.
14378 * linux-low.h (regset_func): Removed.
14379 (regset_fill_func, regset_store_func): New.
14380 (enum regset_type): New.
14381 (struct regset_info): Add type field. Use new operation types.
14382 (struct linux_target_ops): stop_pc renamed to get_pc.
14383 Add decr_pc_after_break and breakpoint_at.
14384 (get_process, get_thread_proess, get_process_thread)
14385 (strut process_info, all_processes, linux_attach_lwp)
14386 (thread_db_init): New.
14388 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14389 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14390 (the_low_target): Add new members.
14391 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14392 (i386_store_fpxregset): Constify.
14393 (target_regsets): Add new kind identifier.
14394 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14395 (i386_set_pc): Add debugging.
14396 (i386_breakpoint_at): New function.
14397 (the_low_target): Add new members.
14398 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14399 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14400 (mips_breakpoint_at): New.
14401 (the_low_target): Add new members.
14402 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14403 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14404 (the_low_target): Add new members.
14405 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14406 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14407 (the_low_target): Add new members.
14408 * linux-x86-64-low.c (target_regsets): Add new kind
14411 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14413 From Martin Pool <mbp@samba.org>:
14414 * server.c (gdbserver_usage): New function.
14417 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14419 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14420 stop_at -> stop_pc.
14422 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14424 * Makefile.in: Remove obsolete code.
14426 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14428 * linux-low.c (regsets_fetch_inferior_registers),
14429 (regsets_store_inferior_registers): Removed cast to int from
14431 * regcache.h: Added declaration of struct inferior_info.
14433 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14435 * inferiors.c (struct inferior_info): Add regcache_data.
14436 (add_inferior): Call create_register_cache.
14437 (clear_inferiors): Call free_register_cache.
14438 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14439 * regcache.c (struct inferior_regcache_data): New.
14440 (registers): Remove.
14441 (get_regcache): New function.
14442 (create_register_cache, free_register_cache): New functions.
14443 (set_register_cache): Don't initialize the register cache here.
14444 (registers_to_string, registers_from_string, register_data): Call
14446 * regcache.h: Add prototypes.
14447 * server.h: Likewise.
14449 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14451 * mem-break.c: New file.
14452 * mem-break.h: New file.
14453 * Makefile.in: Add mem-break.o rule; update server.h
14455 * inferiors.c (struct inferior_info): Add target_data
14457 (clear_inferiors): Free target_data member if set.
14458 (inferior_target_data, set_inferior_target_data): New functions.
14459 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14460 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14461 * linux-low.c (linux_bp_reinsert): New variable.
14462 (struct inferior_linux_data): New.
14463 (linux_create_inferior): Use set_inferior_target_data.
14464 (linux_attach): Likewise. Call add_inferior.
14465 (linux_wait_for_one_inferior): New function.
14466 (linux_wait): Call it.
14467 (linux_write_memory): Add const.
14468 (initialize_low): Call set_breakpoint_data.
14469 * linux-low.h (struct linux_target_ops): Add breakpoint
14471 * server.c (attach_inferior): Remove extra add_inferior
14473 * server.h: Include mem-break.h. Update inferior.c
14475 * target.c (read_inferior_memory)
14476 (write_inferior_memory): New functions.
14477 * target.h (read_inferior_memory)
14478 (write_inferior_memory): Change macros to prototypes.
14479 (struct target_ops): Update comments. Add const to write_memory
14482 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14484 * linux-low.c (usr_store_inferior_registers): Support
14485 registers which are allowed to fail to store.
14486 * linux-low.h (linux_target_ops): Likewise.
14487 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14488 (ppc_cannot_store_register): FPSCR may not be storable.
14490 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14492 * server.h: Include <string.h> if HAVE_STRING_H.
14493 * ChangeLog: Correct paths in last ChangeLog entry.
14495 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14497 * linux-low.h: Remove obsolete prototypes.
14498 (struct linux_target_ops): New.
14499 (extern the_low_target): New.
14500 * linux-low.c (num_regs, regmap): Remove declarations.
14501 (register_addr): Use the_low_target explicitly.
14502 (fetch_register): Likewise.
14503 (usr_fetch_inferior_registers): Likewise.
14504 (usr_store_inferior_registers): Likewise.
14505 * linux-arm-low.c (num_regs): Remove.
14506 (arm_num_regs): Define.
14507 (arm_regmap): Renamed from regmap, made static.
14508 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14510 (arm_cannot_store_register): Renamed from cannot_store_register,
14512 (the_low_target): New.
14513 * linux-i386-low.c (num_regs): Remove.
14514 (i386_num_regs): Define.
14515 (i386_regmap): Renamed from regmap, made static.
14516 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14518 (i386_cannot_store_register): Renamed from cannot_store_register,
14520 (the_low_target): New.
14521 * linux-ia64-low.c (num_regs): Remove.
14522 (ia64_num_regs): Define.
14523 (ia64_regmap): Renamed from regmap, made static.
14524 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14526 (ia64_cannot_store_register): Renamed from cannot_store_register,
14528 (the_low_target): New.
14529 * linux-m68k-low.c (num_regs): Remove.
14530 (m68k_num_regs): Define.
14531 (m68k_regmap): Renamed from regmap, made static.
14532 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14534 (m68k_cannot_store_register): Renamed from cannot_store_register,
14536 (the_low_target): New.
14537 * linux-mips-low.c (num_regs): Remove.
14538 (mips_num_regs): Define.
14539 (mips_regmap): Renamed from regmap, made static.
14540 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14542 (mips_cannot_store_register): Renamed from cannot_store_register,
14544 (the_low_target): New.
14545 * linux-ppc-low.c (num_regs): Remove.
14546 (ppc_num_regs): Define.
14547 (ppc_regmap): Renamed from regmap, made static.
14548 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14550 (ppc_cannot_store_register): Renamed from cannot_store_register,
14552 (the_low_target): New.
14553 * linux-s390-low.c (num_regs): Remove.
14554 (s390_num_regs): Define.
14555 (s390_regmap): Renamed from regmap, made static.
14556 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14558 (s390_cannot_store_register): Renamed from cannot_store_register,
14560 (the_low_target): New.
14561 * linux-sh-low.c (num_regs): Remove.
14562 (sh_num_regs): Define.
14563 (sh_regmap): Renamed from regmap, made static.
14564 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14566 (sh_cannot_store_register): Renamed from cannot_store_register,
14568 (the_low_target): New.
14569 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14570 (the_low_target): New.
14572 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14574 * Makefile.in: Add stamp-h target.
14575 * configure.in: Create stamp-h.
14576 * configure: Regenerated.
14578 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14580 * inferiors.c: New file.
14581 * target.c: New file.
14582 * target.h: New file.
14583 * Makefile.in: Add target.o and inferiors.o. Update
14585 * linux-low.c (inferior_pid): New static variable,
14586 moved from server.c.
14587 (linux_create_inferior): Renamed from create_inferior.
14588 Call add_inferior. Return 0 on success instead of a PID.
14589 (linux_attach): Renamed from myattach.
14590 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14591 (linux_thread_alive): Renamed from mythread_alive.
14592 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14594 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14595 (regsets_store_inferior_registers): Correct error message.
14596 Add missing ``return 0''.
14597 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14598 (linux_store_registers): Renamed from store_inferior_registers.
14599 (linux_read_memory): Renamed from read_inferior_memory.
14600 (linux_write_memory): Renamed from write_inferior_memory.
14601 (linux_target_ops): New structure.
14602 (initialize_low): Call set_target_ops ().
14603 * remote-utils.c (unhexify): New function.
14604 (hexify): New function.
14605 (input_interrupt): Send signals to ``signal_pid''.
14606 * server.c (inferior_pid): Remove.
14607 (start_inferior): Update create_inferior call.
14608 (attach_inferior): Call add_inferior.
14609 (handle_query): New function.
14610 (main): Call handle_query for `q' packets.
14611 * server.h: Include "target.h". Remove obsolete prototypes.
14612 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14614 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14616 * Makefile.in: Add WARN_CFLAGS. Update configury
14618 * configure.in: Check for <string.h>
14619 * configure: Regenerate.
14620 * config.in: Regenerate.
14621 * gdbreplay.c: Include needed system headers.
14622 (remote_open): Remove strchr prototype.
14623 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14624 * regcache.c (supply_register): Change buf argument to const void *.
14625 (supply_register_by_name): Likewise.
14626 (collect_register): Change buf argument to void *.
14627 (collect_register_by_name): Likewise.
14628 * regcache.h: Add missing prototypes.
14629 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14630 * server.c (handle_query): New function.
14631 (attached): New static variable, moved out of main.
14632 (main): Quiet longjmp clobber warnings.
14633 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14634 * utils.c (error): Remove NORETURN.