X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbserver%2FChangeLog;h=3eecdd0857aec749c20cf838e4cda5c62bf0c9fc;hb=c2a66c29c98ee9f824c229eabe1f81d93e5a89ad;hp=bafe109e1e05be3e2b8c49e27fd62f22fce83f73;hpb=30ed0a8f0b4557aeb8bbbeee1bb1904bc45f747e;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index bafe109e1e..b8c8bd7111 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,3705 @@ +2010-09-09 Nathan Sidwell + + * configure.ac: Add --enable-inprocess-agent option. + * configure: Rebuilt. + +2010-09-06 Yao Qi + + * linux-low.c (linux_kill): Remove unused variable. + (linux_stabilize_threads): Likewise. + * server.c (start_inferior): Likewise. + (queue_stop_reply_callback): Likewise. + * tracepoint.c (do_action_at_tracepoint): Likewise. + +2010-09-06 Yao Qi + + * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior + on return. + +2010-09-06 Jan Kratochvil + + * target.c (mywait) : Fix to use INTEGER. + +2010-09-06 Pedro Alves + + * Makefile.in (install-only): Replace $IPA_DEPFILES with + "$(IPA_DEPFILES)". + +2010-09-01 Joel Brobecker + + * gdbserver/lynx-low.c, gdbserver/lynx-low.h, + gdbserver/lynx-ppc-low.c: New files. + * Makefile.in (lynx_low_h): New variable. + (lynx-low.o, lynx-ppc-low.o): New rules. + * configure.ac: On LynxOS, link with -lnetinet. + * configure.srv: Add handling of powerpc-*-lynxos* targets. + * configure: regenerate. + +2010-09-01 Joel Brobecker + + * Makefile.in (vasprintf.o, vsnprintf.o): New rules. + * configure.ac: Add check for vasprintf and vsnprintf. + * configure, config.in: Regenerate. + * server.h (vasprintf, vsnprintf): Add conditional declarations. + +2010-09-01 Joel Brobecker + + * gdbreplay.c: Move include of alloca.h up, next to include of + malloc.h. + * server.h: Add include of malloc.h. + * mem-break.c: Remove include of malloc.h. + * server.c, tracepoint.c, utils.c, win32-low.c: Likewise. + +2010-09-01 Joel Brobecker + + * Makefile.in (memmem.o): Build with -Wno-error. + +2010-09-01 Joel Brobecker + + * utils.c (xsnprintf): Make non-static. + * server.h: Add xsnprintf declaration. + * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c: + replace calls to snprintf by calls to xsnprintf throughout. + +2010-09-01 Joel Brobecker + + * configure.ac: Add configure check for alloca. + * configure, config.in: Regenerate. + * server.h: Include alloca.h if it exists. + * gdbreplay.c: Include alloca.h if it exists. + +2010-08-28 Pedro Alves + + * linux-low.c (__SIGRTMIN): Define if not already defined. + (linux_create_inferior): Check for __ANDROID__ rather than + __SIGRTMIN. + (enqueue_one_deferred_signal): Don't requeue non-RT signals that + are already deferred. + (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN. + (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is + stopped and already has a pending signal to report. + (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has + a pending signal to report or is moving out of a jump pad. + (linux_init_signals): Check for __ANDROID__ rather than + __SIGRTMIN. + +2010-08-28 Pedro Alves + + * linux-low.c (linux_stabilize_threads): Wrap debug output in a + debug_threads check. Avoid a linear search when not doing debug + output. + +2010-08-27 Pedro Alves + + * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t. + (struct gdb_event) : Change type to gdb_fildes_t. + (struct file_handler) : Change type to gdb_fildes_t. + (process_event): Change local fd's type to gdb_fildes_t. + (create_file_handler): Adjust prototype. + (delete_file_handler): Adjust prototype. + (handle_file_event): Adjust prototype. Use pfildes. + (create_file_event): Adjsut prototype. + * remote-utils.c (remote_desc, listen_desc): Change type to + gdb_fildes_t. + * server.h: New gdb_fildes_t typedef. + [USE_WIN32API]: Include winsock2.h. + (delete_file_handler, add_file_handler): Adjust prototypes. + (pfildes): Declare. + * utils.c (pfildes): New. + +2010-08-27 Pedro Alves + + * configure.ac (build_warnings): Add -Wno-char-subscripts. + * configure: Regenerate. + +2010-08-27 Pedro Alves + + * linux-low.c (linux_unprepare_to_access_memory): Rename to ... + (linux_done_accessing_memory): ... this. + (linux_target_ops): Adjust. + * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust. + * nto-low.c (nto_target_ops): Adjust comment. + * server.c (gdb_read_memory, gdb_write_memory): Adjust. + * spu-low.c (spu_target_ops): Adjust comment. + * target.h (target_ops): Rename unprepare_to_access_memory field + to done_accessing_memory. + (unprepare_to_access_memory): Rename to ... + (done_accessing_memory): ... this. + +2010-08-26 Pedro Alves + + * linux-low.c (linux_prepare_to_access_memory): New. + (linux_unprepare_to_access_memory): New. + (linux_target_ops): Install them. + * server.c (read_memory): Rename to ... + (gdb_read_memory): ... this. Use + prepare_to_access_memory/prepare_to_access_memory. + (write_memory): Rename to ... + (gdb_write_memory): ... this. Use + prepare_to_access_memory/prepare_to_access_memory. + (handle_search_memory_1): Adjust. + (process_serial_event): Adjust. + * target.h (struct target_ops): New fields + prepare_to_access_memory and unprepare_to_access_memory. + (prepare_to_access_memory, unprepare_to_access_memory): New. + * linux-x86-low.c (x86_insert_point, x86_remove_point): Use + prepare_to_access_memory/prepare_to_access_memory. + * nto-low.c (nto_target_ops): Adjust. + * spu-low.c (spu_target_ops): Adjust. + * win32-low.c (win32_target_ops): Adjust. + +2010-08-26 Pedro Alves + + * Makefile.in (WARN_CFLAGS): Get it from configure. + (WERROR_CFLAGS): New. + (INTERNAL_CFLAGS): Add WERROR_CFLAGS. + * configure.ac: Introduce --enable-werror, which adds -Werror to + the compiler command line. Enabled by default. Disable with + --disable-werror. Add -Wdeclaration-after-statement + Wpointer-arith and -Wformat-nonliteral to warning flags. + * configure: Regenerate. + +2010-08-26 Pedro Alves + + * mem-break.c [HAVE_MALLOC_H]: Include malloc.h. + +2010-08-26 Pedro Alves + + * gdbreplay.c (remote_error): New. + (gdbchar): New. + (expect): Use gdbchar. Check for error reading from GDB. + Clarify sync error output. + (play): Check for errors writing to GDB. + * linux-low.c (sigchld_handler): Really ignore `write' errors. + * remote-utils.c (getpkt): Check for errors writing to the remote + descriptor. + +2010-08-25 Pedro Alves + + * linux-low.c (linux_wait_1): Move non-debugging code out of + `debug_threads' control. + +2010-08-25 Pedro Alves + + * linux-low.c (linux_wait_1): Don't set last_status here. + * server.c (push_event, queue_stop_reply_callback): Assert we're + not pushing a TARGET_WAITKIND_IGNORE event. + (start_inferior, start_inferior, attach_inferior, handle_v_cont) + (myresume, handle_target_event): Set the thread's last_resume_kind + and last_status from the target returned status. + +2010-08-25 Pedro Alves + + PR threads/10729 + + * linux-x86-low.c (update_debug_registers_callback): New. + (i386_dr_low_set_addr): Use it. + (i386_dr_low_get_addr): New. + (i386_dr_low_set_control): Use update_debug_registers_callback. + (i386_dr_low_get_control): New. + (i386_dr_low_get_status): Adjust. + * linux-low.c (linux_stop_lwp): New. + * linux-low.h (linux_stop_lwp): Declare. + + * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as + argument instead of a i386_debug_reg_state. + (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of + a i386_debug_reg_state. + (i386_insert_aligned_watchpoint): Adjust. + (i386_remove_aligned_watchpoint): Adjust. + (i386_low_stopped_data_address): Read the debug registers from the + inferior instead of from the mirrors. + * i386-low.h (struct i386_debug_reg_state): Extend comment. + (i386_dr_low_get_addr): Declare. + (i386_dr_low_get_control): Declare. + (i386_dr_low_get_status): Change prototype. + + * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals. + (i386_dr_low_get_addr): New. + (i386_dr_low_get_control): New. + (i386_dr_low_get_status): Adjust prototype. Return + dr_status_mirror. + (i386_initial_stuff): Clear dr_status_mirror and + dr_control_mirror. + (i386_get_thread_context): Adjust. + (i386_set_thread_context): Adjust. + (i386_thread_added): Adjust. + +2010-08-24 Pedro Alves + + * linux-low.h (linux_thread_area): Delete declaration. + +2010-08-11 Thomas Schwinge + + * linux-low.c (linux_wait_1): Correctly return the ptid of the child + after its termination. + +2010-08-09 Pedro Alves + + * linux-low.c (gdb_wants_lwp_stopped): Delete. + (gdb_wants_all_stopped): Delete. + (linux_wait_1): Don't call them. + * server.c (handle_v_cont): Tag all threads as want-stopped. + (gdb_wants_thread_stopped): Fix comments. Tag the thread that + stopped as "client-wants-stopped". + +2010-07-31 Pedro Alves + + * Makefile.in (signals_h): New. + (server_h): Depend on it. + (server.o): Don't depend on $(signals_def). + (signals.o): Depend on $(signals_def). + +2010-07-31 Jan Kratochvil + + * Makefile.in (signals_def): New. + (server_h): Append include/gdb/signals.h and signals_def. + (server.o): Append signals_def. + +2010-07-25 Jan Kratochvil + + * server.c (handle_target_event): Use target_signal_to_host for + resume_info.sig initialization. + * target.h (struct thread_resume) : New comment. + +2010-07-20 Ozkan Sezer + + * server.c (handle_query): strcpy() the returned string from paddress() + instead of sprintf(). + * utils.c (paddress): Return phex_nz(). + +2010-07-07 Joel Brobecker + + * server.c (handle_v_cont): Call mourn_inferior if process + just exited. + (myresume): Likewise. + +2010-07-01 Pedro Alves + + Static tracepoints, and integration with UST. + + * configure.ac: Handle --with-ust. substitute ustlibs and ustinc. + * mem-break.c (uninsert_all_breakpoints) + (reinsert_all_breakpoints): New. + * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints): + * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New. + (gdb_agent_ust_loaded, helper_thread_id) + (gdb_agent_helper_thread_id): New macros. + (struct ipa_sym_addresses): Add addr_ust_loaded, + addr_helper_thread_id, addr_cmd_buf. + (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf. + (in_process_agent_loaded_ust): New. + (write_e_ust_not_loaded): New. + (maybe_write_ipa_ust_not_loaded): New. + (struct collect_static_trace_data_action): New. + (enum tracepoint_type) : New. + (struct tracepoint) : Mention static tracepoints. + (struct static_tracepoint_ctx): New. + (CMD_BUF_SIZE): New. + (add_tracepoint_action): Handle static tracepoint actions. + (unprobe_marker_at): New. + (clear_installed_tracepoints): Handle static tracepoints. + (cmd_qtdp): Handle static tracepoints. + (probe_marker_at): New. + (cmd_qtstart): Handle static tracepoints. + (response_tracepoint): Handle static tracepoints. + (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New. + (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat. + (get_context_regcache): Handle static tracepoints. + (do_action_at_tracepoint): Handle static tracepoint actions. + (traceframe_find_block_type): Handle static trace data blocks. + (traceframe_read_sdata): New. + (download_tracepoints): Download static tracepoint actions. + [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h. + (GDB_PROBE_NAME): New. + (ust_ops): New. + (GET_UST_SYM): New. + (USTF): New. + (dlsym_ust): New. + (ust_marker_to_static_tracepoint): New. + (gdb_probe): New. + (collect_ust_data_at_tracepoint): New. + (gdb_ust_probe): New. + (UNIX_PATH_MAX, SOCK_DIR): New. + (gdb_ust_connect_sync_socket): New. + (resume_thread, stop_thread): New. + (run_inferior_command): New. + (init_named_socket): New. + (gdb_ust_socket_init): New. + (cstr_to_hexstr): New. + (next_st): New. + (first_marker, next_marker): New. + (response_ust_marker): New. + (cmd_qtfstm, cmd_qtsstm): New. + (unprobe_marker_at, probe_marker_at): New. + (cmd_qtstmat, gdb_ust_thread): New. + (gdb_ust_init): New. + (initialize_tracepoint_ftlib): Call gdb_ust_init. + * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h + (ST_REGENTRY): New. + (x86_64_st_collect_regmap): New. + (X86_64_NUM_ST_COLLECT_GREGS): New. + (AMD64_RIP_REGNUM): New. + (supply_static_tracepoint_registers): New. + * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h + (ST_REGENTRY): New. + (i386_st_collect_regmap): New. + (i386_NUM_ST_COLLECT_GREGS): New. + (supply_static_tracepoint_registers): New. + * server.c (handle_query): Handle qXfer:statictrace:read. + : Report support for StaticTracepoints, and + qXfer:statictrace:read features. + * server.h (traceframe_read_sdata) + (supply_static_tracepoint_registers): Declare. + * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex) + (unpack_varlen_hex): Include in IPA build. + * Makefile.in (ustlibs, ustinc): New. + (IPA_OBJS): Add remote-utils-ipa.o. + ($(IPA_LIB)): Link -ldl and -lpthread. + (UST_CFLAGS): New. + (IPAGENT_CFLAGS): Add UST_CFLAGS. + * config.in, configure: Regenerate. + +2010-06-20 Ian Lance Taylor + Pedro Alves + + * linux-x86-low.c (always_true): Delete. + (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of + trying to fool the compiler with always_true. + +2010-06-20 Pedro Alves + + * tracepoint.c (condition_true_at_tracepoint): Don't run compiled + conditions in gdbserver. + +2010-06-19 Ulrich Weigand + + * spu-low.c (spu_read_memory): Wrap around local store limit. + (spu_write_memory): Likewise. + +2010-06-15 Pedro Alves + + * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2) + (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with + LONGEST uses. + * server.h (struct emit_ops): Replace int64_t uses with LONGEST + uses. + * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t + uses with LONGEST uses. + +2010-06-14 Stan Shebs + Pedro Alves + + Bytecode compiler. + + * linux-x86-low.c: Include limits.h. + (add_insns): New. + (always_true): New. + (EMIT_ASM): New. + (EMIT_ASM32): New. + (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add) + (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh) + (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext, + (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or) + (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal, + (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref, + (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address) + (amd64_emit_const, amd64_emit_call, amd64_emit_reg) + (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext) + (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1) + (amd64_emit_void_call_2): New. + (amd64_emit_ops): New. + (i386_emit_prologue, i386_emit_epilogue, i386_emit_add) + (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed) + (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not) + (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor) + (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed) + (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto) + (i386_emit_goto, i386_write_goto_address, i386_emit_const) + (i386_emit_call, i386_emit_reg, i386_emit_pop) + (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap) + (i386_emit_stack_adjust, i386_emit_int_call_1) + (i386_emit_void_call_2): New. + (i386_emit_ops): New. + (x86_emit_ops): New. + (the_low_target): Install x86_emit_ops. + * server.h (struct emit_ops): New. + (get_raw_reg_func_addr): Declare. + (current_insn_ptr, emit_error): Declare. + * tracepoint.c (get_raw_reg, get_trace_state_variable_value) + (set_trace_state_variable_value): New defines. + (struct ipa_sym_addresses): New fields addr_get_raw_reg, + addr_get_trace_state_variable_value and + addr_set_trace_state_variable_value. + (symbol_list): New fields for get_raw_reg, + get_trace_state_variable_value and set_trace_state_variable_value. + (condfn): New typedef. + (struct tracepoint): New field `compiled_cond'. + (do_action_at_tracepoint): Clear compiled_cond. + (get_trace_state_variable_value, set_trace_state_variable_value): + Export in the IPA. + (condition_true_at_tracepoint): If there's a compiled condition, + run that. + (current_insn_ptr, emit_error): New globals. + (struct bytecode_address): New. + (get_raw_reg_func_addr): New. + (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul) + (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext) + (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor) + (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned) + (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const) + (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap) + (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New. + (compile_tracepoint_condition, compile_bytecodes): New. + * target.h (emit_ops): Forward declare. + (struct target_ops): New field emit_ops. + (target_emit_ops): New. + * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New. + * linux-i386-ipa.c (gdb_agent_get_raw_reg): New. + * linux-low.c (linux_emit_ops): New. + (linux_target_ops): Install it. + * linux-low.h (struct linux_target_ops): New field emit_ops. + +2010-06-14 Ulrich Weigand + + * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR. + * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW. + +2010-06-01 Pedro Alves + Stan Shebs + + * Makefile.in (IPA_DEPFILES, extra_libraries): New. + (all): Depend on $(extra_libraries). + (install-only): Install the IPA. + (IPA_OBJS, IPA_LIB): New. + (clean): Remove the IPA lib. + (IPAGENT_CFLAGS): New. + (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o) + (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o) + (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules. + * linux-amd64-ipa.c, linux-i386-ipa.c: New files. + * configure.ac: Check for atomic builtins support in the compiler. + (IPA_DEPFILES, extra_libraries): Define. + * configure.srv (ipa_obj): Add description. + (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define. + (i[34567]86-*-linux*): Set ipa_obj. + (x86_64-*-linux*): Set ipa_obj. + * linux-low.c (stabilizing_threads): New. + (supports_fast_tracepoints): New. + (linux_detach): Stabilize threads before detaching. + (handle_tracepoints): Handle internal tracing breakpoints. Assert + the lwp is either not stabilizing, or is moving out of a jump pad. + (linux_fast_tracepoint_collecting): New. + (maybe_move_out_of_jump_pad): New. + (enqueue_one_deferred_signal): New. + (dequeue_one_deferred_signal): New. + (linux_wait_for_event_1): If moving out of a jump pad, defer + pending signals to later. + (linux_stabilize_threads): New. + (linux_wait_1): Check if threads need moving out of jump pads, and + do it if so. + (stuck_in_jump_pad_callback): New. + (move_out_of_jump_pad_callback): New. + (lwp_running): New. + (linux_resume_one_lwp): Handle moving out of jump pads. + (linux_set_resume_request): Dequeue deferred signals. + (need_step_over_p): Also step over fast tracepoint jumps. + (start_step_over): Also uninsert fast tracepoint jumps. + (finish_step_over): Also reinsert fast tracepoint jumps. + (linux_install_fast_tracepoint_jump): New. + (linux_target_ops): Install linux_stabilize_threads and + linux_install_fast_tracepoint_jump_pad. + * linux-low.h (linux_target_ops) : New fields. + (struct lwp_info) : New fields. + (linux_get_thread_area): Declare. + * linux-x86-low.c (jump_insn): New. + (x86_get_thread_area): New. + (append_insns): New. + (push_opcode): New. + (amd64_install_fast_tracepoint_jump_pad): New. + (i386_install_fast_tracepoint_jump_pad): New. + (x86_install_fast_tracepoint_jump_pad): New. + (the_low_target): Install x86_get_thread_area and + x86_install_fast_tracepoint_jump_pad. + * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory. + (struct fast_tracepoint_jump): New. + (fast_tracepoint_jump_insn): New. + (fast_tracepoint_jump_shadow): New. + (find_fast_tracepoint_jump_at): New. + (fast_tracepoint_jump_here): New. + (delete_fast_tracepoint_jump): New. + (set_fast_tracepoint_jump): New. + (uninsert_fast_tracepoint_jumps_at): New. + (reinsert_fast_tracepoint_jumps_at): New. + (set_breakpoint_at): Use write_inferior_memory. + (uninsert_raw_breakpoint): Use write_inferior_memory. + (check_mem_read): Mask out fast tracepoint jumps. + (check_mem_write): Mask out fast tracepoint jumps. + * mem-break.h (struct fast_tracepoint_jump): Forward declare. + (set_fast_tracepoint_jump): Declare. + (delete_fast_tracepoint_jump) + (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at) + (reinsert_fast_tracepoint_jumps_at): Declare. + * regcache.c: Don't compile many functions when building the + in-process agent library. + (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating + the register buffer in the heap. + (free_register_cache): If the register buffer isn't owned by the + regcache, don't free it. + (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate + pre-existing register caches. + * remote-utils.c (convert_int_to_ascii): Constify `from' parameter + type. + (convert_ascii_to_int): : Constify `from' parameter type. + (decode_M_packet, decode_X_packet): Replace the `to' parameter by + a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc + the needed buffer in-place. + (relocate_instruction): New. + * server.c (handle_query) : If the target supports + tracepoints, give it a chance of looking up symbols. Report + support for fast tracepoints. + (handle_status): Stabilize threads. + (process_serial_event): Adjust. + * server.h (struct fast_tracepoint_jump): Forward declare. + (struct process_info) : New field. + (convert_ascii_to_int, convert_int_to_ascii): Adjust. + (decode_X_packet, decode_M_packet): Adjust. + (relocate_instruction): Declare. + (in_process_agent_loaded): Declare. + (tracepoint_look_up_symbols): Declare. + (struct fast_tpoint_collect_status): Declare. + (fast_tracepoint_collecting): Declare. + (force_unlock_trace_buffer): Declare. + (handle_tracepoint_bkpts): Declare. + (initialize_low_tracepoint) + (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare. + * target.h (struct target_ops) : New fields. + (stabilize_threads, install_fast_tracepoint_jump_pad): New. + * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h. + [HAVE_STDINT_H]: Include stdint.h. + (trace_debug_1): Rename to ... + (trace_vdebug): ... this. + (trace_debug): Rename to ... + (trace_debug_1): ... this. Add `level' parameter. + (trace_debug): New. + (ATTR_USED, ATTR_NOINLINE): New. + (IP_AGENT_EXPORT): New. + (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end) + (collecting, gdb_collect, stop_tracing, flush_trace_buffer) + (about_to_request_buffer_space, trace_buffer_is_full) + (stopping_tracepoint, expr_eval_result, error_tracepoint) + (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr) + (trace_buffer_lo, trace_buffer_hi, traceframe_read_count) + (traceframe_write_count, traceframes_created) + (trace_state_variables) + New renaming defines. + (struct ipa_sym_addresses): New. + (STRINGIZE_1, STRINGIZE, IPA_SYM): New. + (symbol_list): New. + (ipa_sym_addrs): New. + (all_tracepoint_symbols_looked_up): New. + (in_process_agent_loaded): New. + (write_e_ipa_not_loaded): New. + (maybe_write_ipa_not_loaded): New. + (tracepoint_look_up_symbols): New. + (debug_threads) [IN_PROCESS_AGENT]: New. + (read_inferior_memory) [IN_PROCESS_AGENT]: New. + (UNKNOWN_SIDE_EFFECTS): New. + (stop_tracing): New. + (flush_trace_buffer): New. + (stop_tracing_bkpt): New. + (flush_trace_buffer_bkpt): New. + (read_inferior_integer): New. + (read_inferior_uinteger): New. + (read_inferior_data_pointer): New. + (write_inferior_data_pointer): New. + (write_inferior_integer): New. + (write_inferior_uinteger): New. + (struct collect_static_trace_data_action): Delete. + (enum tracepoint_type): New. + (struct tracepoint) : New field `type'. + : Only include in GDBserver. + + : New fields. + (tracepoints): Use IP_AGENT_EXPORT. + (last_tracepoint): Don't include in the IPA. + (stopping_tracepoint): Use IP_AGENT_EXPORT. + (trace_buffer_is_full): Use IP_AGENT_EXPORT. + (alloced_trace_state_variables): New. + (trace_state_variables): Use IP_AGENT_EXPORT. + (traceframe_t): Delete unused variable. + (circular_trace_buffer): Don't include in the IPA. + (trace_buffer_start): Delete. + (struct trace_buffer_control): New. + (trace_buffer_free): Delete. + (struct ipa_trace_buffer_control): New. + (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV) + (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT): + New. + (trace_buffer_ctrl): New. + (TRACE_BUFFER_CTRL_CURR): New. + (trace_buffer_start, trace_buffer_free, trace_buffer_end_free): + Reimplement as macros. + (trace_buffer_wrap): Delete. + (traceframe_write_count, traceframe_read_count) + (traceframes_created, tracing): Use IP_AGENT_EXPORT. + (struct tracepoint_hit_ctx) : New field. + (struct fast_tracepoint_ctx): New. + (memory_barrier): New. + (cmpxchg): New. + (record_tracepoint_error): Update atomically in the IPA. + (clear_inferior_trace_buffer): New. + (about_to_request_buffer_space): New. + (trace_buffer_alloc): Handle GDBserver and inferior simulatenous + updating the same buffer. + (add_tracepoint): Default the tracepoint's type to trap + tracepoint, and orig_size to -1. + (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated + internal variables. + (create_trace_state_variable): New parameter `gdb'. Handle it. + (clear_installed_tracepoints): Clear fast tracepoint jumps. + (cmd_qtdp): Handle fast tracepoints. + (cmd_qtdv): Adjust. + (max_jump_pad_size): New. + (gdb_jump_pad_head): New. + (get_jump_space_head): New. + (claim_jump_space): New. + (sort_tracepoints): New. + (MAX_JUMP_SIZE): New. + (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the + IPA. + (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected + support. Upload fast traceframes, and delete internal IPA + breakpoints. + (stop_tracing_handler): New. + (flush_trace_buffer_handler): New. + (cmd_qtstop): Upload fast tracepoints. + (response_tracepoint): Handle fast tracepoints. + (tracepoint_finished_step): Upload fast traceframes. Set the + tracepoint hit context's tracepoint type. + (handle_tracepoint_bkpts): New. + (tracepoint_was_hit): Set the tracepoint hit context's tracepoint + type. Add comment about fast tracepoints. + (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the + non-existing action_str field. + (get_context_regcache): Handle fast tracepoints. + (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC + to the regcache. + (fast_tracepoint_from_jump_pad_address): New. + (fast_tracepoint_from_ipa_tpoint_address): New. + (collecting_t): New. + (force_unlock_trace_buffer): New. + (fast_tracepoint_collecting): New. + (collecting): New. + (gdb_collect): New. + (write_inferior_data_ptr): New. + (target_tp_heap): New. + (target_malloc): New. + (download_agent_expr): New. + (UALIGN): New. + (download_tracepoints): New. + (download_trace_state_variables): New. + (upload_fast_traceframes): New. + (IPA_FIRST_TRACEFRAME): New. + (IPA_NEXT_TRACEFRAME_1): New. + (IPA_NEXT_TRACEFRAME): New. + [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h. + [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer) + (gdb_jump_pad_buffer_end): New. + [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New. + (initialize_tracepoint): Adjust. + [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch + buffer. Initialize the low module. + * utils.c (PREFIX, TOOLNAME): New. + (malloc_failure): Use PREFIX. + (error): In the IPA, an error causes an exit. + (fatal, warning): Use PREFIX. + (internal_error): Use TOOLNAME. + (NUMCELLS): Increase to 10. + * configure, config.in: Regenerate. + +2010-06-01 Pedro Alves + + * server.c (handle_query) : Do two passes over the + qSupported string to avoid nesting strtok. + +2010-05-28 Jan Kratochvil + + * Makefile.in (SFILES): Add $(srcdir)/proc-service.list. + (CDEPS): New. + * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also + -Wl,--dynamic-list. + * configure: Regenerate. + * proc-service.list: New. + +2010-05-28 Jan Kratochvil + + * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT. + New comment. + +2010-05-26 Ozkan Sezer + + * gdbreplay.c (remote_open): Check error return from socket() call by + its equality to -1 not by it being negative. + * remote-utils.c (remote_open): Likewise. + +2010-05-23 Pedro Alves + + * config.h: Regenerate. + +2010-05-19 Maxim Kuvyrkov + + * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel + doesn't provide PTRACE_GET_THREAD_AREA. + +2010-05-19 Maxim Kuvyrkov + + * linux-m68k-low.c: Include + (ps_get_thread_area): Implement. + +2010-05-03 Doug Evans + + * event-loop.c (struct callback_event): New struct. + (callback_list): New global. + (append_callback_event, delete_callback_event): New functions. + (process_callback): New function. + (start_event_loop): Call it. + * remote-utils.c (NOT_SCHEDULED): Define. + (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals, + moved out of readchar. + (readchar): Rewrite. Call reschedule before returning. + (reset_readchar): New function. + (remote_close): Call it. + (process_remaining, reschedule): New functions. + * server.h (callback_handler_func): New typedef. + (append_callback_event, delete_callback_event): Declare. + +2010-05-03 Pedro Alves + + * proc-service.c (ps_pglobal_lookup): Use + thread_db_look_up_one_symbol. + * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb' + parameter. Use it instead of all_symbols_looked_up. + * server.h (struct process_info) : Delete + field. + (all_symbols_looked_up): Don't declare. + (look_up_one_symbol): Add new `may_ask_gdb' parameter. + * thread-db.c (struct thread_db) : New + field. + (thread_db_look_up_symbols): Adjust call to look_up_one_symbol. + Set all_symbols_looked_up here. + (thread_db_look_up_one_symbol): New. + (thread_db_get_tls_address): Adjust. + (thread_db_load_search, try_thread_db_load_1): Always allocate the + thread_db object on the heap, and tentatively set it in the + process structure. + (thread_db_init): Don't set all_symbols_looked_up here. + * linux-low.h (thread_db_look_up_one_symbol): Declare. + +2010-05-03 Pedro Alves + + * linux-low.c (linux_kill, linux_detach): Adjust. + (status_pending_p_callback): Remove redundant statement. Check + for !TARGET_WAITIKIND_IGNORE, instead of + TARGET_WAITKIND_STOPPED. + (handle_tracepoints): Make sure LWP is locked. Adjust. + (linux_wait_for_event_1): Adjust. + (linux_cancel_breakpoints): New. + (unsuspend_one_lwp): New. + (unsuspend_all_lwps): New. + (linux_wait_1): If finishing a step-over, unsuspend all lwps. + (send_sigstop_callback): Change return type to int, add new + `except' parameter and handle it. + (suspend_and_send_sigstop_callback): New. + (stop_all_lwps): Add new `suspend' and `expect' parameters, and + pass them down. If SUSPEND, also increment the lwp's suspend + count. + (linux_resume_one_lwp): Add notice about resuming a suspended LWP. + (need_step_over_p): Don't consider suspended LWPs. + (start_step_over): Adjust. + (proceed_one_lwp): Change return type to int, add new `except' + parameter and handle it. + (unsuspend_and_proceed_one_lwp): New. + (proceed_all_lwps): Use find_inferior instead of + for_each_inferior. + (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them + also decrement the suspend count of LWPs. Pass `except' down, + instead of hacking its suspend count. + (linux_pause_all): Add `freeze' parameter. Adjust. + (linux_unpause_all): New. + (linux_target_ops): Install linux_unpause_all. + * server.c (handle_status): Adjust. + * target.h (struct target_ops): New fields `unpause_all' and + `cancel_breakpoints'. Add new parameter to `pause_all'. + (pause_all): Add new `freeze' parameter. + (unpause_all): New. + (cancel_breakpoints): New. + * tracepoint.c (clear_installed_tracepoints): Pause threads, and + cancel breakpoints. + (cmd_qtstart): Pause threads. + (stop_tracing): Pause threads, and cancel breakpoints. + * win32-low.c (win32_target_ops): Adjust. + +2010-05-03 Pedro Alves + + * linux-low.c (linux_wait_for_event_1): Move passing the signal to + the inferior right away from here... + (linux_wait_1): ... to here, and adjust to check the thread's + last_resume_kind instead of the lwp's step or stop_expected flags. + +2010-05-02 Pedro Alves + + * README: Use consistent `GDB' and `GDBserver' spellings. + +2010-05-02 Pedro Alves + + * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped. + (linux_kill): Stop all lwps here. Don't delete the main lwp here. + (linux_detach_one_lwp): Assume the lwp is stopped. + (any_thread_of): Delete. + (linux_detach): Stop all lwps here. Don't blindly delete all + breakpoints. + (delete_lwp_callback): New. + (linux_mourn): Delete all lwps of the process that is gone. + (linux_wait_1): Don't delete the last lwp of the process here. + * mem-break.h (mark_breakpoints_out): Declare. + * mem-break.c (mark_breakpoints_out): New. + (free_all_breakpoints): Use it. + * server.c (handle_target_event): If the process is gone, mark + breakpoints out. + * thread-db.c (struct thread_db) : New field. + (thread_db_enable_reporting): Fix prototype. Store a thread event + breakpoint reference in the thread_db struct. + (thread_db_load_search): Clear the thread_db object. + (try_thread_db_load_1): Ditto. + (switch_to_process): New. + (disable_thread_event_reporting): Use it. + (remove_thread_event_breakpoints): New. + (thread_db_detach, thread_db_mourn): Use it. + +2010-05-01 Pedro Alves + + * linux-low.c (linux_enable_event_reporting): New. + (linux_wait_for_event_1, handle_extended_wait): Use it. + +2010-04-30 Pedro Alves + + * linux-low.c (linux_kill_one_lwp, linux_kill) + (linux_detach_one_lwp): Adjust to send_sigstop interface change. + (send_sigstop): Take an lwp_info as parameter instead. Queue a + SIGSTOP even if the LWP is stopped. + (send_sigstop_callback): New. + (stop_all_lwps): Use send_sigstop_callback instead. + (linux_resume_one_thread): Adjust. + (proceed_one_lwp): Still proceed an LWP that the client has + requested to stop, if we haven't reported it as stopped yet. Make + sure that LWPs the client want stopped, have a pending SIGSTOP. + +2010-04-26 Doug Evans + + * server.c (handle_general_set): Make static. + + * remote-utils.c (putpkt_binary_1): Call readchar instead of read. + Print received char after testing for error/eof instead of before. + (input_interrupt): Tweak comment. + +2010-04-23 Doug Evans + + * server.c (start_inferior): Print inferior argv if --debug. + +2010-04-21 Aleksandar Ristovski + + * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists. + * nto-x86-low.c: Include server.h + +2010-04-20 Pierre Muller + + * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to + be consistent with other sources of this directory. + (init_registers_amd64): Correct name of source file of this function + in the comment. + +2010-04-19 Pierre Muller + + * configure.srv (x86_64-*-mingw*): New configuration for Windows + 64-bit executables. + +2010-04-19 Pierre Muller + + * win32-i386-low.c: Add 64-bit support. + (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting. + (init_registers_amd64): Declare. + (mappings): Add 64-bit version of array. + (init_windows_x86): New function. + (the_low_target): Change init_arch field to init_windows_x86. + +2010-04-19 Pierre Muller + + * win32-low.c: Adapt to support also 64-bit architecture. + (child_xfer_memory): Use uintptr_t type for local variable `addr'. + (get_image_name): Use SIZE_T type for local variable `done'. + (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'. + (toolhelp_get_dll_name): Idem. + (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'. + Use uintptr_t typecast to avoid warning. + (handle_unload_dll): Use uintptr_t typecast to avoid warning. + (handle_exception): Use phex_nz to avoid warning. + (win32_wait): Remove unused local variable `process'. + +2010-04-19 Pierre Muller + + * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by + `amd64-avx.o'. + +2010-04-17 Pierre Muller + + * configure.ac: Use `ws2_32' library for srv_mingw. + * configure: Regenerate. + * gdbreplay.c: Include winsock2.h instead of winsock.h. + * remote-utils.c: Likewise. + +2010-04-17 H.J. Lu + + * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only + if __x86_64__ is defined. + +2010-04-16 Pierre Muller + + * configure: Regenerate. + +2010-04-16 Pierre Muller + + * server.c (handle_query): Handle 'qGetTIBAddr' query. + * target.h (target_ops): New get_tib_address field. + * win32-low.h (win32_thread_info): Add thread_local_base field. + * win32-low.c (child_add_thread): Add tlb argument. + Set thread_local_base field to TLB. + (get_child_debug_event): Adapt to child_add_thread change. + (win32_get_tib_address): New function. + (win32_target_ops): Set get_tib_address field to + win32_get_tib_address. + * linux-low.c (linux_target_ops): Set get_tib_address field to NULL. + +2010-04-12 Pedro Alves + + * linux-low.c (linux_mourn): Also remove the process. + * server.c (handle_target_event): Don't remove the process here. + * nto-low.c (nto_mourn): New. + (nto_target_ops): Install it. + * spu-low.c (spu_mourn): New. + (spu_target_ops): Install it. + * win32-low.c (win32_mourn): New. + (win32_target_ops): Install it. + +2010-04-12 Pedro Alves + + * server.h (buffer_xml_printf): Remove redundant `;'. + +2010-04-12 Pedro Alves + + * regcache.c (set_register_cache): Invalidate regcaches before + changing the register cache layout. + (regcache_invalidate_one): Allow a NULL regcache. + * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate + regcaches before changing the register cache layout or the target + regsets. + +2010-04-12 H.J. Lu + + * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused + variable warning on Linux/x86-64. + +2010-04-11 Pedro Alves + + GDBserver disconnected tracing support. + + * linux-low.c (linux_remove_process): Delete. + (add_lwp): Don't set last_resume_kind here. + (linux_kill): Use `mourn'. + (linux_detach): Use `thread_db_detach', and `mourn'. + (linux_mourn): New. + (linux_attach_lwp_1): Adjust comment. + (linux_attach): last_resume_kind moved the thread_info; adjust. + (status_pending_p_callback): Adjust. + (linux_wait_for_event_1): Adjust. + (count_events_callback, select_singlestep_lwp_callback) + (select_event_lwp_callback, cancel_breakpoints_callback) + (db_wants_lwp_stopped, linux_wait_1, need_step_over_p) + (proceed_one_lwp): Adjust. + (linux_async): Add debug output. + (linux_thread_stopped): New. + (linux_pause_all): New. + (linux_target_ops): Install linux_mourn, linux_thread_stopped and + linux_pause_all. + * linux-low.h (struct lwp_info): Delete last_resume_kind field. + (thread_db_free): Delete declaration. + (thread_db_detach, thread_db_mourn): Declare. + * thread-db.c (thread_db_init): Use thread_db_mourn. + (thread_db_free): Delete, split in two. + (disable_thread_event_reporting): New. + (thread_db_detach): New. + (thread_db_mourn): New. + + * server.h (struct thread_info) : New field. + : Add comment. + : New field. + (handler_func): Change return type to int. + (handle_serial_event, handle_target_event): Ditto. + (gdb_connected): Declare. + (tracing): Delete. + (disconnected_tracing): Declare. + (stop_tracing): Declare. + + * server.c (handle_query) : Report support for + disconnected tracing. + (queue_stop_reply_callback): Account for running threads. + (gdb_wants_thread_stopped): New. + (gdb_wants_all_threads_stopped): New. + (gdb_reattached_process): New. + (handle_status): Clear the `gdb_detached' flag of all processes. + In all-stop, stop all threads. + (main): Be sure to leave tfind mode. Handle disconnected tracing. + (process_serial_event): If the remote connection breaks, or if an + exit was forced with "monitor exit", force an event loop exit. + Handle disconnected tracing on detach. + (handle_serial_event): Adjust. + (handle_target_event): If GDB isn't connected, forward events back + to the inferior, unless the last process exited, in which case, + exit gdbserver. Adjust interface. + + * remote-utils.c (remote_open): Don't block in accept. Instead + register an event loop source on the listen socket file + descriptor. Refactor bits into ... + (listen_desc): ... this new global. + (gdb_connected): ... this new function. + (enable_async_notification): ... this new function. + (handle_accept_event): ... this new function. + (remote_close): Clear remote_desc. + + * inferiors.c (add_thread): Set the new thread's last_resume_kind. + + * target.h (struct target_ops) : + New fields. + (mourn_inferior): Define. + (target_process_qsupported): Avoid the dangling else problem. + (thread_stopped): Define. + (pause_all): Define. + (target_waitstatus_to_string): Declare. + * target.c (target_waitstatus_to_string): New. + + * tracepoint.c (tracing): Make extern. + (disconnected_tracing): New. + (stop_tracing): Make extern. Handle tracing stops due to GDB + disconnecting. + (cmd_qtdisconnected): New. + (cmd_qtstatus): Report disconnected tracing status in trace reply. + (handle_tracepoint_general_set): Handle QTDisconnected. + + * event-loop.c (event_handler_func): Change return type to int. + (process_event): Bail out if the event handler wants the event + loop to stop. + (handle_file_event): Ditto. + (start_event_loop): Bail out if the event handler wants the event + loop to stop. + + * nto-low.c (nto_target_ops): Adjust. + * spu-low.c (spu_wait): Don't remove the process here. + (spu_target_ops): Adjust. + * win32-low.c (win32_wait): Don't remove the process here. + (win32_target_ops): Adjust. + +2010-04-11 Pedro Alves + + * regcache.c (realloc_register_cache): Invalidate inferior's + regcache before recreating it. + +2010-04-09 Pedro Alves + + * tracepoint.c (cmd_qtstatus): Report trace buffer circularity. + +2010-04-09 Stan Shebs + Pedro Alves + + * server.h (LONGEST): New. + (struct thread_info) : New field. + (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz): + Declare. + (initialize_tracepoint, handle_tracepoint_general_set) + (handle_tracepoint_query, tracepoint_finished_step) + (tracepoint_was_hit, release_while_stepping_state_list): + (current_traceframe): Declare. + * server.c (handle_general_set): Handle tracepoint packets. + (read_memory): New. + (write_memory): New. + (handle_search_memory_1): Use read_memory. + (handle_query): Report support for conditional tracepoints, trace + state variables, and tracepoint sources. Handle tracepoint + queries. + (main): Initialize the tracepoints module. + (process_serial_event): Handle traceframe reads/writes. + + * linux-low.c (handle_tracepoints): New. + (linux_wait_1): Call it. + (linux_resume_one_lwp): Handle while-stepping. + (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New. + (linux_target_ops): Install them. + * linux-low.h (struct linux_target_ops) : + New field. + * linux-x86-low.c (x86_supports_tracepoints): New. + (the_low_target). Install it. + + * mem-break.h (delete_breakpoint): Declare. + * mem-break.c (delete_breakpoint): Make external. + + * target.h (struct target_ops): Add `supports_tracepoints', + `read_pc', and `write_pc' fields. + (target_supports_tracepoints): Define. + * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two) + (phex_nz): New. + + * regcache.h (struct regcache) : New field. + (init_register_cache, regcache_cpy): Declare. + (regcache_read_pc, regcache_write_pc): Declare. + (register_cache_size): Declare. + (supply_regblock): Declare. + * regcache.c (init_register_cache): New. + (new_register_cache): Use it. + (regcache_cpy): New. + (register_cache_size): New. + (supply_regblock): New. + (regcache_read_pc, regcache_write_pc): New. + + * tracepoint.c: New. + + * Makefile.in (OBS): Add tracepoint.o. + (tracepoint.o): New rule. + +2010-04-08 H.J. Lu + + * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c. + (i386-mmx.o): New. + (i386-mmx.c): Likewise. + (i386-mmx-linux.o): Likewise. + (i386-mmx-linux.c): Likewise. + + * configure.srv (srv_i386_regobj): Add i386-mmx.o. + (srv_i386_linux_regobj): Add i386-mmx-linux.o. + (srv_i386_xmlfiles): Add i386/i386-mmx.xml. + (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml. + + * linux-x86-low.c (init_registers_i386_mmx_linux): New. + (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux + and return if ptrace PTRACE_GETFPXREGS failed in 32bit. + +2010-04-07 H.J. Lu + + * Makefile.in (clean): Updated. + (i386-avx.o): New. + (i386-avx.c): Likewise. + (i386-avx-linux.o): Likewise. + (i386-avx-linux.c): Likewise. + (amd64-avx.o): Likewise. + (amd64-avx.c): Likewise. + (amd64-avx-linux.o): Likewise. + (amd64-avx-linux.c): Likewise. + + * configure.srv (srv_i386_regobj): Add i386-avx.o. + (srv_i386_linux_regobj): Add i386-avx-linux.o. + (srv_amd64_regobj): Add amd64-avx.o. + (srv_amd64_linux_regobj): Add amd64-avx-linux.o. + (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml. + (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml. + (srv_i386_xmlfiles): Add i386/i386-avx.xml. + (srv_amd64_xmlfiles): Add i386/amd64-avx.xml. + (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml. + (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml. + + * i387-fp.c: Include "i386-xstate.h". + (i387_xsave): New. + (i387_cache_to_xsave): Likewise. + (i387_xsave_to_cache): Likewise. + (x86_xcr0): Likewise. + + * i387-fp.h (i387_cache_to_xsave): Likewise. + (i387_xsave_to_cache): Likewise. + (x86_xcr0): Likewise. + + * linux-arm-low.c (target_regsets): Initialize nt_type to 0. + * linux-crisv32-low.c (target_regsets): Likewise. + * linux-m68k-low.c (target_regsets): Likewise. + * linux-mips-low.c (target_regsets): Likewise. + * linux-ppc-low.c (target_regsets): Likewise. + * linux-s390-low.c (target_regsets): Likewise. + * linux-sh-low.c (target_regsets): Likewise. + * linux-sparc-low.c (target_regsets): Likewise. + * linux-xtensa-low.c (target_regsets): Likewise. + + * linux-low.c: Include . + (regsets_fetch_inferior_registers): Support nt_type. + (regsets_store_inferior_registers): Likewise. + (linux_process_qsupported): New. + (linux_target_ops): Add linux_process_qsupported. + + * linux-low.h (regset_info): Add nt_type. + (linux_target_ops): Add process_qsupported. + + * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h" + and . + (init_registers_i386_avx_linux): New. + (init_registers_amd64_avx_linux): Likewise. + (xmltarget_i386_linux_no_xml): Likewise. + (xmltarget_amd64_linux_no_xml): Likewise. + (PTRACE_GETREGSET): Likewise. + (PTRACE_SETREGSET): Likewise. + (x86_fill_xstateregset): Likewise. + (x86_store_xstateregset): Likewise. + (use_xml): Likewise. + (x86_linux_update_xmltarget): Likewise. + (x86_linux_process_qsupported): Likewise. + (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type. + (x86_arch_setup): Don't call init_registers_amd64_linux nor + init_registers_i386_linux here. Call + x86_linux_update_xmltarget. + (the_low_target): Add x86_linux_process_qsupported. + + * server.c (handle_query): Call target_process_qsupported. + + * target.h (target_ops): Add process_qsupported. + (target_process_qsupported): New. + +2010-04-03 Pedro Alves + + * inferiors.c (add_thread): Set last_status kind to + TARGET_WAITKIND_IGNORE. + * linux-low.c (cancel_breakpoint): Remove unnecessary regcache + fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls. + (linux_wait_1): Move `thread' local definition to block that uses + it. Don't NULL initialize `event_child'. + (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls. + Alway set the thread's last_status to TARGET_WAITKIND_IGNORE. + * linux-x86-low.c (x86_breakpoint_at): Read raw memory. + +2010-04-01 Pedro Alves + + * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with + an extended waitstatus, or by a watchpoint. + (cancel_breakpoints_callback): Don't cancel a breakpoint if the + thread was stepping or has been stopped by a watchpoint. + +2010-04-01 Pedro Alves + + * mem-break.c (struct raw_breakpoint): New field shlib_disabled. + (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top + of another, then delete the previous, and validate all + breakpoints. + (validate_inserted_breakpoint): New. + (delete_disabled_breakpoints): New. + (validate_breakpoints): New. + (check_mem_read): Validate breakpoints before trusting their + shadow. Delete disabled breakpoints. + (check_mem_write): Validate breakpoints before trusting they + should be inserted. Delete disabled breakpoints. + * mem-break.h (validate_breakpoints): + * server.c (handle_query): Validate breakpoints when we see a + qSymbol query. + +2010-04-01 Pedro Alves + + * linux-low.c (linux_wait_1): Avoid setting need_step_over is + there's a GDB breakpoint at stop_pc. Always report a trap to GDB + if we could tell there's a GDB breakpoint at stop_pc. + (need_step_over_p): Don't do a step over if we find a GDB + breakpoint at the resume PC. + + * mem-break.c (struct raw_breakpoint): New. + (enum bkpt_type): New type `gdb_breakpoint'. + (struct breakpoint): Delete the `PC', `old_data' and `inserted' + fields. New field `raw'. + (find_raw_breakpoint_at): New. + (set_raw_breakpoint_at): Handle refcounting. Create a raw + breakpoint instead. + (set_breakpoint_at): Adjust. + (delete_raw_breakpoint): New. + (release_breakpoint): New. + (delete_breakpoint): Rename to... + (delete_breakpoint_1): ... this. Add proc parameter. Use + release_breakpoint. Return ENOENT. + (delete_breakpoint): Reimplement. + (find_breakpoint_at): Delete. + (find_gdb_breakpoint_at): New. + (delete_breakpoint_at): Delete. + (set_gdb_breakpoint_at): New. + (delete_gdb_breakpoint_at): New. + (gdb_breakpoint_here): New. + (set_reinsert_breakpoint): Use release_breakpoint. + (uninsert_breakpoint): Rename to ... + (uninsert_raw_breakpoint): ... this. + (uninsert_breakpoints_at): Adjust to handle raw breakpoints. + (reinsert_raw_breakpoint): Change parameter type to + raw_breakpoint. + (reinsert_breakpoints_at): Adjust to handle raw breakpoints + instead. + (check_breakpoints): Adjust. Use release_breakpoint. + (breakpoint_here): Rewrite using find_raw_breakpoint_at. + (breakpoint_inserted_here): Ditto. + (check_mem_read): Adjust to iterate over raw breakpoints instead. + Don't trust the breakpoint's shadow if it is not inserted. + (check_mem_write): Adjust to iterate over raw breakpoints instead. + (delete_all_breakpoints): Adjust. + (free_all_breakpoints): Mark all breakpoints as uninserted, and + use delete_breakpoint_1. + + * mem-break.h (breakpoints_supported): Delete declaration. + (set_gdb_breakpoint_at): Declare. + (gdb_breakpoint_here): Declare. + (delete_breakpoint_at): Delete. + (delete_gdb_breakpoint_at): Declare. + + * server.h (struct raw_breakpoint): Forward declare. + (struct process_info): New field `raw_breakpoints'. + + * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0 + breakpoints. + +2010-03-24 Pedro Alves + + * linux-low.c (status_pending_p_callback): Fix comment. + (linux_wait_for_event_1): Move most of the internal breakpoint + handling from here... + (linux_wait_1): ... to here. + (count_events_callback): New. + (select_singlestep_lwp_callback): New. + (select_event_lwp_callback): New. + (cancel_breakpoints_callback): New. + (select_event_lwp): New. + (linux_wait_1): Simplify internal breakpoint handling. Give equal + priority to all LWPs that have had events that should be reported + to the client. Cancel breakpoints when about to reporting the + event to the client, not while stopping lwps. No longer cancel + finished single-steps here. + (cancel_finished_single_step): Delete. + (cancel_finished_single_steps): Delete. + +2010-03-24 Pedro Alves + + * mem-break.c (enum bkpt_type): New. + (struct breakpoint): New field `type'. + (set_breakpoint_at): Change return type to struct breakpoint + pointer. Set type to `other_breakpoint' by default. + (delete_breakpoint): Rewrite, supporting more than one breakpoint + in the breakpoint list. + (delete_reinsert_breakpoints): Only delete reinsert breakpoints. + (reinsert_breakpoint): Rename to ... + (reinsert_raw_breakpoint): ... this. + (reinsert_breakpoints_at): Adjust. + * mem-break.h (struct breakpoint): Declare. + (set_breakpoint_at): Change return type to struct breakpoint + pointer. + +2010-03-24 Pedro Alves + + * server.c (handle_query): Assign, not compare. + +2010-03-24 Pedro Alves + + Teach linux gdbserver to step-over-breakpoints. + + * linux-low.c (can_hardware_single_step): New. + (supports_breakpoints): New. + (handle_extended_wait): If stopping threads, read the stop pc of + the new cloned LWP. + (get_pc): New. + (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the + low target doesn't support retrieving the PC. + (add_lwp): Set last_resume_kind to resume_continue. + (linux_attach_lwp_1): Adjust comments. Always set stop_expected. + (linux_attach): Don't clear stop_expected. Set the lwp's + last_resume_kind to resume_stop. + (linux_detach_one_lwp): Don't check for removed breakpoints. + (check_removed_breakpoint): Delete. + (status_pending_p): Rename to ... + (status_pending_p_callback): ... this. Don't check for removed + breakpoints. Don't consider threads that are stopped from GDB's + perspective. + (linux_wait_for_lwp): Always read the stop_pc here. + (cancel_breakpoint): New. + (step_over_bkpt): New global. + (linux_wait_for_event_1): Implement stepping over breakpoints. + (gdb_wants_lwp_stopped): New. + (gdb_wants_all_stopped): New. + (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished + single-step traps here. Store the thread's last reported target + wait status. + (send_sigstop): Don't clear stop_expected. Always set it, + instead. + (mark_lwp_dead): Remove reference to pending_is_breakpoint. + (cancel_finished_single_step): New. + (cancel_finished_single_steps): New. + (wait_for_sigstop): Don't cancel finished single-step traps here. + (linux_resume_one_lwp): Don't check for removed breakpoints. + Don't set `step' on non-hardware step archs. + (linux_set_resume_request): Ignore resume_stop requests if already + stopping or stopped. Set the lwp's last_resume_kind. + (resume_status_pending_p): Don't check for removed breakpoints. + (need_step_over_p): New. + (start_step_over): New. + (finish_step_over): New. + (linux_resume_one_thread): Always queue a sigstop for resume_stop + requests. Clear the thread's last reported target waitstatus. + Don't use the `suspended' flag. Don't consider pending breakpoints. + (linux_resume): Start a step-over if necessary. + (proceed_one_lwp): New. + (proceed_all_lwps): New. + (unstop_all_lwps): New. + * linux-low.h (struct lwp_info): Rewrite comment for the + `suspended' flag. Add the `stop_pc' field. Delete the + `pending_stop_pc' field. Tweak the `stepping' flag's comment. + Add `'last_resume_kind' and `need_step_over' fields. + * inferiors.c (struct thread_info): Delete, moved elsewhere. + * mem-break.c (struct breakpoint): Delete `reinserting' flag. + Delete `breakpoint_to_reinsert' field. New flag `inserted'. + (set_raw_breakpoint_at): New. + (set_breakpoint_at): Rewrite to use it. + (reinsert_breakpoint_handler): Delete. + (set_reinsert_breakpoint): New. + (reinsert_breakpoint_by_bp): Delete. + (delete_reinsert_breakpoints): New. + (uninsert_breakpoint): Rewrite. + (uninsert_breakpoints_at): New. + (reinsert_breakpoint): Rewrite. + (reinsert_breakpoints_at): New. + (check_breakpoints): Rewrite. + (breakpoint_here): New. + (breakpoint_inserted_here): New. + (check_mem_read): Adjust. + * mem-break.h (breakpoints_supported, breakpoint_here) + (breakpoint_inserted_here, set_reinsert_breakpoint): Declare. + (reinsert_breakpoint_by_bp): Delete declaration. + (delete_reinsert_breakpoints): Declare. + (reinsert_breakpoint): Delete declaration. + (reinsert_breakpoints_at): Declare. + (uninsert_breakpoint): Delete declaration. + (uninsert_breakpoints_at): Declare. + (check_breakpoints): Adjust prototype. + * server.h: Adjust include order. + (struct thread_info): Declare here. Add a `last_status' field. + +2010-03-23 Michael Snyder + + * server.c (crc32): New function. + (handle_query): Add handling for 'qCRC:' request. + +2010-03-23 Pedro Alves + + * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the + lwp had been stopped by a watchpoint. + +2010-03-16 Pedro Alves + + * server.h (internal_error): Declare. + (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define. + * utils.c (internal_error): New function. + +2010-03-15 Andreas Schwab + + * configure.srv: Fix typo setting srv_regobj. + +2010-03-15 Pedro Alves + + * linux-low.c (fetch_register): Avoid passing a non string literal + format to `error'. + (usr_store_inferior_registers): Ditto. + +2010-03-14 Pedro Alves + + * linux-low.c (linux_write_memory): Bail out early if peeking + memory failed. + +2010-03-14 Pedro Alves + + * linux-low.h (struct lwp_info): New fields + `stopped_by_watchpoint' and `stopped_data_address'. + * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers + here, and cache them in the lwp object. + (wait_for_sigstop): Check stopped_by_watchpoint lwp field + directly. + (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint + field. + (linux_stopped_by_watchpoint): Rewrite. + (linux_stopped_data_address): Rewrite. + +2010-03-06 Simo Melenius + + * linux-low.c (linux_wait_for_lwp): Fetch the regcache after + switching the current inferior, not before. + +2010-03-01 H.J. Lu + + * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c, + reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c, + i386-linux.c and amd64-linux.c. + (reg-i386.o): Removed. + (reg-i386.c): Likewise. + (reg-i386-linux.o): Likewise. + (reg-i386-linux.c): Likewise. + (reg-x86-64.o): Likewise. + (reg-x86-64.c): Likewise. + (reg-x86-64-linux.o): Likewise. + (reg-x86-64-linux.c): Likewise. + (i386.o): New. + (i386.c): Likewise. + (i386-linux.o): Likewise. + (i386-linux.c): Likewise. + (amd64.o): Likewise. + (amd64.c): Likewise. + (amd64-linux.o): Likewise. + (amd64-linux.c): Likewise. + + * configure.srv (srv_i386_regobj): New. + (srv_i386_linux_regobj): Likewise. + (srv_amd64_regobj): Likewise. + (srv_amd64_linux_regobj): Likewise. + (srv_i386_32bit_xmlfiles): Likewise. + (srv_i386_64bit_xmlfiles): Likewise. + (srv_i386_xmlfiles): Likewise. + (srv_amd64_xmlfiles): Likewise. + (srv_i386_linux_xmlfiles): Likewise. + (srv_amd64_linux_xmlfiles): Likewise. + (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set + srv_xmlfiles to $srv_i386_xmlfiles. + (i[34567]86-*-mingw32ce*): Likewise. + (i[34567]86-*-mingw*): Likewise. + (i[34567]86-*-nto*): Likewise. + (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj + and $srv_amd64_linux_regobj. Set srv_xmlfiles to + $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles. + (x86_64-*-linux*): Likewise. + + * linux-x86-low.c (init_registers_x86_64_linux): Removed. + (init_registers_amd64_linux): New. + (x86_arch_setup): Replace init_registers_x86_64_linux with + init_registers_amd64_linux. + +2010-02-23 Maxim Kuvyrkov + + * configure.ac: Check for libdl. If it is not available link against + static libthread_db. + * configure: Regenerate. + +2010-02-22 Pedro Alves + + PR9605 + + * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if + handing a read watchpoint. + (i386_low_insert_watchpoint): Read watchpoints aren't supported. + +2010-02-12 Doug Evans + + * linux-low.c (linux_supports_tracefork_flag): Document. + (linux_look_up_symbols): Add comment. + +2010-02-03 H.J. Lu + + * regcache.c (supply_register): Clear regcache if buf is NULL. + +2010-02-02 Nicolas Roche + Joel Brobecker + + * inferiors.c (find_inferior): Add function documentation. + (unloaded_dll): Handle the case where the unloaded dll has not + been previously registered in the dll list. + +2010-02-01 Daniel Jacobowitz + + * linux-arm-low.c (thumb_breakpoint_len): Delete. + (thumb2_breakpoint): New. + (arm_breakpoint_at): Check for Thumb-2 breakpoints. + +2010-01-29 Daniel Jacobowitz + + * linux-low.c (get_stop_pc): Check for SIGTRAP. + (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible + breakpoints. + +2010-01-21 Pedro Alves + + * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes. + +2010-01-21 Jan Kratochvil + + * linux-s390-low.c (s390_collect_ptrace_register) + (s390_supply_ptrace_register): Adjust it for the new regcache parameter. + +2010-01-21 Doug Evans + + * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*. + (PTRACE_ARG4_TYPE): New macro. + (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE. + (linux_wait_for_event_1, linux_resume_one_lwp): Ditto. + (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE. + (usr_store_inferior_registers): Ditto. + (linux_read_memory, linux_write_memory): Ditto. + (linux_test_for_tracefork): Ditto. + + * linux-arm-low.c: Remove redundant include of gdb_proc_service.h. + Only include elf.h if gdb_proc_service.h didn't include linux/elf.h. + +2010-01-21 Pedro Alves + + * proc-service.c (ps_lgetregs): Don't refetch registers from the + target. + +2010-01-21 Pedro Alves + + * spu-low.c (spu_fetch_registers, spu_store_registers): Change + prototype to take a regcache. Adjust. + +2010-01-20 Pedro Alves + + * regcache.h (struct thread_info): Forward declare. + (struct regcache): New. + (new_register_cache): Adjust prototype. + (get_thread_regcache): Declare. + (free_register_cache): Adjust prototype. + (registers_to_string, registers_from_string): Ditto. + (supply_register, supply_register_by_name, collect_register) + (collect_register_as_string, collect_register_by_name): Ditto. + * regcache.c (struct inferior_regcache_data): Delete. + (get_regcache): Rename to ... + (get_thread_regcache): ... this. Adjust. Switch inferior before + fetching registers. + (regcache_invalidate_one): Adjust. + (regcache_invalidate): Fix prototype. + (new_register_cache): Return the new register cache. + (free_register_cache): Change prototype. + (realloc_register_cache): Adjust. + (registers_to_string): Change prototype to take a regcache. Adjust. + (registers_from_string): Ditto. + (register_data): Ditto. + (supply_register): Ditto. + (supply_register_by_name): Ditto. + (collect_register): Ditto. + (collect_register_as_string): Ditto. + (collect_register_by_name): Ditto. + * server.c (process_serial_event): Adjust. + * linux-low.h (regset_fill_func, regset_store_func): Change + prototype. + (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register): + Change prototype. + * linux-low.c (get_stop_pc): Adjust. + (check_removed_breakpoint): Adjust. + (linux_wait_for_event): Adjust. + (linux_resume_one_lwp): Adjust. + (fetch_register): Add regcache parameter. Adjust. + (usr_store_inferior_registers): Ditto. + (regsets_fetch_inferior_registers): Ditto. + (regsets_store_inferior_registers): Ditto. + (linux_fetch_registers, linux_store_registers): Ditto. + * i387-fp.c (i387_cache_to_fsave): Change prototype to take a + regcache. Adjust. + (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto. + * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change + prototype to take a regcache. + (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto. + * remote-utils.c (convert_ascii_to_int, outreg) + (prepare_resume_reply): Change prototype to take a regcache. + Adjust. + * target.h (struct target_ops) : + Change prototype to take a regcache. + (fetch_inferior_registers, store_inferior_registers): Change + prototype to take a regcache. Adjust. + * proc-service.c (ps_lgetregs): Adjust. + * linux-x86-low.c (x86_fill_gregset, x86_store_gregset) + (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset) + (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to + take a regcache. Adjust. + * linux-arm-low.c (arm_fill_gregset, arm_store_gregset) + (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset) + (arm_store_vfpregset, arm_get_pc, arm_set_pc): + (arm_breakpoint_at): Change prototype to take a regcache. Adjust. + * linux-cris-low.c (cris_get_pc, cris_set_pc) + (cris_cannot_fetch_register): + (cris_breakpoint_at): Change prototype to take a regcache. + Adjust. + * linux-crisv32-low.c (cris_get_pc, cris_set_pc, + cris_reinsert_addr, cris_write_data_breakpoint): Change prototype + to take a regcache. Adjust. + (cris_breakpoint_at, cris_insert_point, cris_remove_point): + Adjust. + * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to + take a regcache. Adjust. + * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset) + (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc, + (m68k_set_pc): Change prototype to take a regcache. Adjust. + * linux-mips-low.c (mips_get_pc): + (mips_set_pc): Change prototype to take a regcache. Adjust. + (mips_reinsert_addr): Adjust. + (mips_collect_register): Change prototype to take a regcache. + Adjust. + (mips_supply_register): + (mips_collect_register_32bit, mips_supply_register_32bit) + (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset) + (mips_store_fpregset): Ditto. + * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register): + Ditto. + (parse_spufs_run): Adjust. + (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset) + (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset) + (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to + take a regcache. Adjust. + * linux-s390-low.c (s390_collect_ptrace_register) + (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc) + (s390_set_pc): Change prototype to take a regcache. Adjust. + (s390_arch_setup): Adjust. + * linux-sh-low.c (sh_get_pc, sh_breakpoint_at) + (sh_fill_gregset): Change prototype to take a regcache. Adjust. + * linux-sparc-low.c (sparc_fill_gregset_to_stack) + (sparc_fill_gregset, sparc_store_gregset_from_stack) + (sparc_store_gregset, sparc_get_pc): Change prototype to take a + regcache. Adjust. + (sparc_breakpoint_at): Adjust. + * linux-xtensa-low.c (xtensa_fill_gregset): + (xtensa_store_gregset): + (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc) + (xtensa_set_pc): Change prototype to take a regcache. Adjust. + * nto-low.c (nto_fetch_registers, nto_store_registers): Change + prototype to take a regcache. Adjust. + * win32-arm-low.c (arm_fetch_inferior_register) + (arm_store_inferior_register): Change prototype to take a + regcache. Adjust. + * win32-i386-low.c (i386_fetch_inferior_register) + (i386_store_inferior_register): Change prototype to take a + regcache. Adjust. + * win32-low.c (child_fetch_inferior_registers) + (child_store_inferior_registers): Change prototype to take a + regcache. Adjust. + (win32_wait): Adjust. + (win32_fetch_inferior_registers): Change prototype to take a + regcache. Adjust. + (win32_store_inferior_registers): Adjust. + * win32-low.h (struct win32_target_ops) : Change prototype to take a regcache. + +2010-01-20 Doug Evans + + * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in + #ifdef. + (linux_wait_for_event1, linux_init_signals): Ditto. + (W_STOPCODE): Provide definition if missing. + +2010-01-13 Vladimir Prus + + * linux-low.c (linux_core_of_thread): New. + (compare_ints, show_process, list_threads): New. + (linux_qxfer_osdata): Report threads and cores. + (linux_target_op): Register linux_core_of_thread. + * remote-utils.c (prepare_resume_reply): Report the core. + (buffer_xml_printf): Support %d specifier. + * server.c (handle_threads_qxfer_proper, handle_threads_qxfer): + New. + (handle_query): Handle qXfer:threads. Announce availability + thereof. + * target.h (struct target_ops): New field core_of_thread. + +2010-01-04 Ulrich Weigand + + * Makefile.in (clean): Remove new generated files. + (reg-s390.o, reg-s390.c): Remove rules. + (reg-s390x.o, reg-s390x.c): Likewise. + (s390-linux32.o, s390-linux32.c): Add rules. + (s390-linux64.o, s390-linux64.c): Likewise. + (s390x-linux64.o, s390x-linux64.c): Likewise. + * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. + * linux-s390-low.c: Include . + (HWCAP_S390_HIGH_GPRS): Define if undefined. + (init_registers_s390): Remove prototype. + (init_registers_s390x): Likewise. + (init_registers_s390_linux32): Add prototype. + (init_registers_s390_linux64): Likewise. + (init_registers_s390x_linux64): Likewise. + (s390_num_regs_3264): New define. + (s390_regmap_3264): New global variable. + (s390_cannot_fetch_register): Remove obsolete check. + (s390_cannot_store_register): Likewise. + (s390_collect_ptrace_register): Handle upper/lower register halves. + (s390_supply_ptrace_register): Likewise. + (s390_fill_gregset): Update to register number changes. + (s390_get_hwcap): New routine. + (s390_arch_setup): Detect 32-bit process running on 64-bit system. + Install appropriate regmap and register set. + +2010-01-01 Joel Brobecker + + * server.c (gdbserver_version): Update copyright year to 2010. + * gdbreplay.c (gdbreplay_version): Likewise. + +2009-12-28 Doug Evans + + * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h, + elf/external.h. Include instead but only if necessary. + +2009-12-28 Pedro Alves + + * linux-low.c (linux_remove_process): Remove `detaching' + parameter. Don't release/detach from thread_db here. + (linux_kill): Release/detach from thread_db here, ... + (linux_detach): ... and here, before actually detaching. + (linux_wait_1): ... and here, when a process exits. + * thread-db.c (any_thread_of): New. + (thread_db_free): Switch the current inferior to a thread of the + passed in process. + +2009-12-21 Doug Evans + + * linux-x86-low.c: Delete outdated comment about Elf32_Phdr. + + * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill. + Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc + warning ifndef __NR_tkill. Move setting of errno there too. + Delete unnecessary resetting of errno after syscall. + Minor comment changes to match gdb/linux-nat.c:kill_lwp. + + * configure.ac: Check for dladdr. + * config.in: Regenerate. + * configure: Regenerate. + * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR. + (try_thread_db_load): Update. + + * linux-low.c (my_waitpid): Delete unnecessary prototype. + +2009-12-18 Doug Evans + + * event-loop.c: Include unistd.h if it exists. + + * linux-low.c (my_waitpid): Move definition away from being in + between linux_tracefork_child/linux_test_for_tracefork. + + * gdb_proc_service.h (psaddr_t): Fix type. + * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix + signature to match glibc. + +2009-12-16 Doug Evans + + * linux-low.c (linux_read_memory): Fix argument to read. + +2009-11-26 Pedro Alves + + * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT + events, don't leave current_inferior pointing at null. + +2009-11-26 Pedro Alves + + * win32-low.c (LOG): Delete. + (OUTMSG): Output to stderr. + (OUTMSG2): Conditionalize on `debug_threads' variable, instead of + on compile time LOG macro. + (win32_wait): Fix debug output. + +2009-11-26 Pedro Alves + + * win32-low.c (win32_add_one_solib): If the dll name is + "ntdll.dll", prepend the system directory to the dll path. + +2009-11-17 Daniel Jacobowitz + + * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization. + +2009-11-17 Nathan Sidwell + Vladimir Prus + + * Makefile.in (reg-cf.o, reg-cf.c): New targets. + * configure.ac: Check for __mcoldfire__ and set + gdb_cv_m68k_is_coldfire. + * configure.srv: Use gdb_cv_m68k_is_coldfire to select between + reg-cf.o and reg-m68k.o. + * configure: Regenerated. + +2009-11-16 Pedro Alves + + * linux-low.c (linux_remove_process): Add `detaching' parameter. + Pass it to thread_db_free. + (linux_kill, linux_detach, linux_wait_1): Adjust to pass the + proper `detaching' argument to linux_remove_process. + * linux-low.h (thread_db_free): Add `detaching' parameter. + * thread-db.c (thread_db_init): Pass false as `detaching' argument + to thread_db_free. + (thread_db_free): Add `detaching' parameter. Only + call td_ta_clear_event if detaching from process. + +2009-11-12 Maxim Kuvyrkov + + * thread-db.c (thread_db_free): Fix typo. + +2009-11-11 Paul Pluzhnikov + + PR gdb/10838 + * thread-db.c (thread_db_free): Call td_ta_clear_event. + +2009-11-03 Nathan Sidwell + + * configure.ac (i[34567]86-*): Check if we're targetting x86-64 + with an i686 compiler. + * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if + needed. + * configure: Rebuilt. + +2009-10-29 Sandra Loosemore + + PR gdb/10783 + + * server.c (handle_search_memory_1): Correct read_addr initialization + in loop for searching subsequent chunks. + +2009-10-29 Paul Pluzhnikov + + * configure.ac: New --with-libthread-db option. + * thread-db.c: Allow direct dependence on libthread_db. + (thread_db_free): Adjust. + * config.in: Regenerate. + * configure: Likewise. + +2009-10-28 Paul Pluzhnikov + + PR gdb/10757 + * thread-db.c (attach_thread): New function. + (maybe_attach_thread): Return success/failure. + (find_new_threads_callback): Adjust. + (thread_db_find_new_threads): Loop until no new threads. + +2009-10-13 Pedro Alves + + * proc-service.c (ps_lgetregs): Formatting. + +2009-10-08 Paul Pluzhnikov + + * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove. + * configure.ac: Adjust. + * linux-low.h (struct process_info_private): Move members to struct + thread_db. + (thread_db_free, thread_db_handle_monitor_command): New prototype. + * linux-low.c (linux_remove_process): Adjust. + (linux_wait_for_event_1, linux_look_up_symbols): Likewise. + * server.c (handle_query): Move code ... + (handle_monitor_command): ... here. New function. + * target.h (struct target_ops): New member. + * thread-db.c (struct thread_db): New. + (libthread_db_search_path): New variable. + (thread_db_create_event, thread_db_enable_reporting) + (find_one_thread, maybe_attach_thread, find_new_threads_callback) + (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust. + (try_thread_db_load_1, dladdr_to_soname): New functions. + (try_thread_db_load, thread_db_load_search): New functions. + (thread_db_init): Search for libthread_db. + (thread_db_free): New function. + (thread_db_handle_monitor_command): Likewise. + * config.in: Regenerate. + * configure: Regenerate. + +2009-09-27 Ulrich Weigand + + * spu-low.c (spu_kill): Wait for inferior to terminate. + Call clear_inferiors. + (spu_detach): Call clear_inferiors. + +2009-08-22 Ralf Wildenhues + + * aclocal.m4: Regenerate. + * config.in: Likewise. + * configure: Likewise. + +2009-07-31 Ulrich Weigand + + * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define. + (parse_spufs_run): New function. + (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC. + (ppc_breakpoint_at): Handle SPU breakpoints. + +2009-07-31 Ulrich Weigand + + * linux-low.c: Include and . + (SPUFS_MAGIC): Define. + (spu_enumerate_spu_ids): New function. + (linux_qxfer_spu): New function. + (linux_target_ops): Install linux_qxfer_spu. + +2009-07-31 Ulrich Weigand + + * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o + and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml + and rs6000/powerpc-cell64l.xml to srv_xmlfiles. + * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules. + (powerpc-cell64l.o, powerpc-cell64l.c): Likewise. + (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c. + * linux-ppc-low.c (PPC_FEATURE_CELL): Define. + (init_registers_powerpc_cell32l): Add prototype. + (init_registers_powerpc_cell64l): Likewise. + (ppc_arch_setup): Detect Cell/B.E. architecture. + +2009-07-30 Ralf Wildenhues + + * Makefile.in (datarootdir): New variable. + +2009-07-28 Daniel Jacobowitz + + * linux-low.c (linux_write_memory): Update debugging output. + * Makefile.in (clean): Add new descriptions. + (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o) + (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules. + * configure.srv: Add new files for arm*-*-linux*. + * linux-arm-low.c: Add new declarations. + (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined. + (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3) + (HWCAP_VFPv3D16): New. + (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT + instead of __IWMMXT__. + (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap) + (arm_arch_setup): New. + (target_regsets): Remove #ifdef. Add VFP regset. + (the_low_target): Use arm_arch_setup. + +2009-07-28 Daniel Jacobowitz + + * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip + the main thread again. + +2009-07-06 Aleksandar Ristovski + + Adding Neutrino gdbserver. + * configure: Regenerated. + * configure.ac: Add case for srv_qnx and set LIBS accordingly. + * configure.srv (i[34567]86-*-nto*): New target. + * nto-low.c, nto-low.h, nto-x86-low.c: New files. + * remote-utils.c [__QNX__]: Include sys/iomgr.h + (nto_comctrl) [__QNX__]: New function. + (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl. + +2009-07-05 Danny Backx + + * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to + srv_tgtobj. + +2009-07-04 Danny Backx + Pedro Alves + + * win32-i386-low.c (i386_get_thread_context): Handle systems that + don't support CONTEXT_EXTENDED_REGISTERS. + (i386_win32_breakpoint, i386_win32_breakpoint_len): New. + (the_low_target): Install them. + * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent + failing with ERROR_PIPE_NOT_CONNECTED. + +2009-06-30 Doug Evans + Pierre Muller + + Add h/w watchpoint support to x86-linux, win32-i386. + * Makefile.in (SFILES): Add i386-low.c + (i386_low_h): Define. + (i386-low.o): Add dependencies. + (linux-x86-low.o): Add i386-low.h dependency. + (win32-i386-low.o): Ditto. + * i386-low.c: New file. + * i386-low.h: New file. + * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj. + (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto. + * linux-low.c (linux_add_process): Initialize arch_private. + (linux_remove_process): Free arch_private. + (add_lwp): Initialize arch_private. + (delete_lwp): Free arch_private. + (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if + provided. + * linux-low.h (process_info_private): New member arch_private. + (lwp_info): New member arch_private. + (linux_target_ops): New members new_process, new_thread, + prepare_to_resume. + (ptid_of): New macro. + * linux-x86-low.c: Include stddef.h, i386-low.h. + (arch_process_info): New struct. + (arch_lwp_info): New struct. + (x86_linux_dr_get, x86_linux_dr_set): New functions. + (i386_dr_low_set_addr, i386_dr_low_set_control): New functions. + (i386_dr_low_get_status): New function. + (x86_insert_point, x86_remove_point): New functions. + (x86_stopped_by_watchpoint): New function. + (x86_stopped_data_address): New function. + (x86_linux_new_process, x86_linux_new_thread): New functions. + (x86_linux_prepare_to_resume): New function. + (the_low_target): Add entries for insert_point, remove_point, + stopped_by_watchpoint, stopped_data_address, new_process, new_thread, + prepare_to_resume. + * server.c (debug_hw_points): New global. + (monitor_show_help): Document set debug-hw-points. + (handle_query): Process "set debug-hw-points". + * server.h (debug_hw_points): Declare. + (paddress): Declare. + * utils.c (NUMCELLS, CELLSIZE): New macros. + (get_sell, xsnprintf, paddress): New functions. + * win32-arm-low.c (the_low_target): Add entries for insert_point, + remove_point, stopped_by_watchpoint, stopped_data_address. + * win32-i386-low.c: Include i386-low.h. + (debug_reg_state): Replaces dr. + (i386_dr_low_set_addr, i386_dr_low_set_control): New functions. + (i386_dr_low_get_status): New function. + (i386_insert_point, i386_remove_point): New functions. + (i386_stopped_by_watchpoint): New function. + (i386_stopped_data_address): New function. + (i386_initial_stuff): Update. + (get_thread_context,set_thread_context,i386_thread_added): Update. + (the_low_target): Add entries for insert_point, + remove_point, stopped_by_watchpoint, stopped_data_address. + * win32-low.c (win32_insert_watchpoint): New function. + (win32_remove_watchpoint): New function. + (win32_stopped_by_watchpoint): New function. + (win32_stopped_data_address): New function. + (win32_target_ops): Add entries for insert_watchpoint, + remove_watchpoint, stopped_by_watchpoint, stopped_data_address. + * win32-low.h (win32_target_ops): New members insert_point, + remove_point, stopped_by_watchpoint, stopped_data_address. + +2009-06-25 Pedro Alves + + * server.c (process_serial_event): Re-return unsupported, not + error, if the type isn't recognized. Re-allow supporting only + insert or remove packets. Also call require_running for + breakpoints. Add missing break statement to default case. Tidy. + * target.h (struct target_ops): Rename insert_watchpoint to + insert_point, and remove_watchpoint to remove_point. + + * linux-low.h (struct linux_target_ops): Likewise. + * linux-low.c (linux_insert_watchpoint): Rename to ... + (linux_insert_point): ... this. Adjust. + (linux_remove_watchpoint): Rename to ... + (linux_remove_point): ... this. Adjust. + (linux_target_ops): Adjust. + * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ... + (cris_insert_point): ... this. + (cris_remove_watchpoint): Rename to ... + (cris_remove_point): ... this. + (the_low_target): Adjust. + +2009-06-24 Pierre Muller + + * server.c (handle_v_kill): Pass signal_pid to + kill_inferior if multi_process is zero. + +2009-06-23 Aleksandar Ristovski + + * server.c (process_serial_event): Add support for Z0 and Z1 packet. + * target.h (target_ops): Comment for *_watchpoint to make it clear + the functions can get types '0' and '1'. + +2009-06-22 Aleksandar Ristovski + + * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0. + * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers. + * regcache.c (get_regcache): Likewise. + * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion. + * win32-low.c (child_fetch_inferior_registers): Remove check for + regno 0. + +2009-06-19 Aleksandar Ristovski + Pedro Alves + + * target.h (struct target_ops) : New + callback. + (target_supports_multi_process): New. + * server.c (handle_query): Even if GDB reports support, only + enable multi-process if the target also supports it. Report + multi-process support only if the target backend supports it. + * linux-low.c (linux_supports_multi_process): New function. + (linux_target_ops): Install it as target_supports_multi_process + callback. + +2009-05-24 Doug Evans + + Global renaming of find_thread_pid to find_thread_ptid. + * server.h (find_thread_ptid): Renamed from find_thread_pid. + * inferiors.c (find_thread_ptid): Renamed from find_thread_pid. + All callers updated. + + * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp + to resume the newly created thread, don't call ptrace (PTRACE_CONT) + directly. + + * linux-low.c (get_stop_pc): Print pc if debug_threads. + (check_removed_breakpoint, linux_wait_for_lwp): Ditto. + (linux_resume_one_lwp): Ditto. + +2009-05-23 Doug Evans + + * linux-low.c (linux_resume_one_lwp): Change type of first arg + from struct inferior_list_entry * to struct lwp_info *. + All callers updated. + +2009-05-13 Doug Evans + + * linux-x86-low.c: Don't include assert.h. + (x86_siginfo_fixup): Use fatal, not assert. + (x86_arch_setup): Fix comment. + +2009-05-12 Doug Evans + + Biarch support for i386/amd64 gdbserver. + * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c. + Add linux-x86-low.c. + (linux-i386-low.o, linux-x86-64-low.o): Delete. + (linux-x86-low.o): Add. + * linux-x86-64-low.c: Delete. + * linux-i386-low.c: Delete. + * linux-x86-low.c: New file. + * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with + linux-x86-low.o. + (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with + linux-x86-low.o. + (x86_64-linux srv_regobj): Add reg-i386-linux.o. + * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h. + (linux_child_pid_to_exec_file): New function. + (elf_64_header_p, elf_64_file_p): New functions. + (siginfo_fixup): New function. + (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to + give target a chance to convert layout. + * linux-low.h (linux_target_ops): New member siginfo_fixup. + (linux_child_pid_to_exec_file, elf_64_file_p): Declare. + +2009-05-07 Doug Evans + + * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak. + (regsets_store_inferior_registers): Ditto. + +2009-05-06 Pedro Alves + + PR server/10048 + + * linux-low.c (must_set_ptrace_flags): Delete. + (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead + of the global. + (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set + `lwp->must_set_ptrace_flags' instead. + (linux_wait_for_event_1): Set ptrace options here. + (linux_wait_1): ... not here. + +2009-04-30 Doug Evans + + * inferiors.c (started_inferior_callback): New function. + (attached_inferior_callback): New function. + (have_started_inferiors_p, have_attached_inferiors_p): New functions. + * server.c (print_started_pid, print_attached_pid): New functions. + (detach_or_kill_for_exit): New function. + (main): Call it instead of for_each_inferior (kill_inferior_callback). + * server.h (have_started_inferiors_p): Declare. + (have_attached_inferiors_p): Declare. + + * inferiors.c (remove_process): Fix memory leak, free process. + * linux-low.c (linux_remove_process): New function. + (linux_kill): Call it instead of remove_process. + (linux_detach, linux_wait_1): Ditto. + +2009-04-19 Danny Backx + + * configure.srv: Add x86 Windows CE target. + +2009-04-03 Ulrich Weigand + + * inferiors.c (get_thread_process): Make global. + * server.h (get_thread_process): Add prototype. + * thread-db.c (find_one_thread): Use get_thread_process + instead of current_process. + (thread_db_get_tls_address): Do not crash if called when + thread layer is not yet initialized. + +2009-04-03 Ulrich Weigand + + * remote-utils.c (prepare_resume_reply): Null-terminate packet. + * spu-low.c (current_tid): Rename to ... + (current_ptid): ... this. + (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory, + spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use + ptid_get_lwp (current_ptid) instead of current_tid. + (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument + instead of current_tid. Use find_process_pid to verify pid + argument is valid. Pass proper argument to remove_process. + (spu_thread_alive): Compare current_ptid instead of current_tid. + (spu_resume): Likewise. + +2009-04-02 Pedro Alves + + * linux-low.c (usr_store_inferior_registers): Declare local `pid' + variable. + +2009-04-01 Pedro Alves + + Implement the multiprocess extensions, and add linux multiprocess + support. + + * server.h (ULONGEST): Declare. + (struct ptid, ptid_t): New. + (minus_one_ptid, null_ptid): Declare. + (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp) + (ptid_get_tid, ptid_equal, ptid_is_pid): Declare. + (struct inferior_list_entry): Change `id' type from unsigned from + to ptid_t. + (struct sym_cache, struct breakpoint, struct + process_info_private): Forward declare. + (struct process_info): Declare. + (current_process): Declare. + (all_processes): Declare. + (initialize_inferiors): Declare. + (add_thread): Adjust to use ptid_t. + (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto. + (add_process, remove_process, find_thread_pid): Declare. + (find_inferior_id): Adjust to use ptid_t. + (cont_thread, general_thread, step_thread): Change type to ptid_t. + (multi_process): Declare. + (push_event): Adjust to use ptid_t. + (read_ptid, write_ptid): Declare. + (prepare_resume_reply): Adjust to use ptid_t. + (clear_symbol_cache): Declare. + * inferiors.c (all_processes): New. + (null_ptid, minus_one_ptid): New. + (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp) + (ptid_get_tid, ptid_equal, ptid_is_pid): New. + (add_thread): Change unsigned long to ptid. Remove gdb_id + parameter. Adjust. + (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid. + (gdb_id_to_thread): Rename to ... + (find_thread_pid): ... this. Change unsigned long to ptid. + (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid. + (loaded_dll, pull_pid_from_list): Adjust. + (add_process, remove_process, find_process_pid) + (get_thread_process, current_process, initialize_inferiors): New. + * target.h (struct thread_resume) : Change type to ptid_t. + (struct target_waitstatus) : Ditto. + (struct target_ops) : Add `pid' argument. Change + return type to int. + (struct target_ops) : Add `pid' argument. + (struct target_ops) : Change pid's type to ptid_t. + (struct target_ops) : Add `ptid' field. Change return type + to ptid. + (kill_inferior, detach_inferior, join_inferior): Add `pid' argument. + (mywait): Add `ptid' argument. Change return type to ptid_t. + (target_pid_to_str): Declare. + * target.c (set_desired_inferior): Adjust to use ptids. + (mywait): Add new `ptid' argument. Adjust. + (target_pid_to_str): New. + * mem-break.h (free_all_breakpoints): Declare. + * mem-break.c (breakpoints): Delelete. + (set_breakpoint_at, delete_breakpoint, find_breakpoint_at) + (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust + to use per-process breakpoint list. + (free_all_breakpoints): New. + * remote-utils.c (struct sym_cache) : Drop `const'. + (symbol_cache, all_symbols_looked_up): Delete. + (hexchars): New. + (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one, + read_ptid): New. + (prepare_resume_reply): Change ptid argument's type from unsigned + long to ptid_t. Adjust. Implement W;process and X;process. + (free_sym_cache, clear_symbol_cache): New. + (look_up_one_symbol): Adjust to per-process symbol cache. * + * server.c (cont_thread, general_thread, step_thread): Change type + to ptid_t. + (attached): Delete. + (multi_process): New. + (last_ptid): Change type to ptid_t. + (struct vstop_notif) : Change type to ptid_t. + (queue_stop_reply, push_event): Change `ptid' argument's type to + ptid_t. + (discard_queued_stop_replies): Add `pid' argument. + (start_inferior): Adjust to use ptids. Adjust to mywait interface + changes. Don't reference the `attached' global. + (attach_inferior): Adjust to mywait interface changes. + (handle_query): Adjust to use ptids. Parse GDB's qSupported + features. Handle and report "multiprocess+". Handle + "qAttached:PID". + (handle_v_cont): Adjust to use ptids. Adjust to mywait interface + changes. + (handle_v_kill): New. + (handle_v_stopped): Adjust to use target_pid_to_str. + (handle_v_requests): Allow multiple attaches and runs when + multiprocess extensions are in effect. Handle "vKill". + (myresume): Adjust to use ptids. + (queue_stop_reply_callback): Add `arg' parameter. Handle it. + (handle_status): Adjust to discard_queued_stop_replies interface + change. + (first_thread_of, kill_inferior_callback) + (detach_or_kill_inferior_callback, join_inferiors_callback): New. + (main): Call initialize_inferiors. Adjust to use ptids, killing + and detaching from all inferiors. Handle multiprocess packet + variants. + * linux-low.h: Include gdb_proc_service.h. + (struct process_info_private): New. + (struct linux_target_ops) : Use ptid_get_pid. + : Use ptid_get_lwp. + (get_lwp_thread): Adjust. + (struct lwp_info): Add `dead' member. + (find_lwp_pid): Declare. + * linux-low.c (thread_db_active): Delete. + (new_inferior): Adjust comment. + (inferior_pid): Delete. + (linux_add_process): New. + (handle_extended_wait): Adjust. + (add_lwp): Change unsigned long to ptid. + (linux_create_inferior): Add process to processes table. Adjust + to use ptids. Don't set new_inferior here. + (linux_attach_lwp): Rename to ... + (linux_attach_lwp_1): ... this. Add `initial' argument. Handle + it. Adjust to use ptids. + (linux_attach_lwp): New. + (linux_attach): Add process to processes table. Don't set + new_inferior here. + (struct counter): New. + (second_thread_of_pid_p, last_thread_of_process_p): New. + (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to + multiple processes. + (linux_kill): Add `pid' argument. Handle it. Adjust to multiple + processes. Remove process from process table. + (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust + to multiple processes. + (any_thread_of): New. + (linux_detach): Add `pid' argument, and handle it. Remove process + from processes table. + (linux_join): Add `pid' argument. Handle it. + (linux_thread_alive): Change unsighed long argument to ptid_t. + Consider dead lwps as not being alive. + (status_pending_p): Rename `dummy' argument to `arg'. Filter out + threads we're not interested in. + (same_lwp, find_lwp_pid): New. + (linux_wait_for_lwp): Change `pid' argument's type from int to + ptid_t. Adjust. + (linux_wait_for_event): Rename to ... + (linux_wait_for_event_1): ... this. Change `pid' argument's type + from int to ptid_t. Adjust. + (linux_wait_for_event): New. + (linux_wait_1): Add `ptid' argument. Change return type to + ptid_t. Adjust. Use last_thread_of_process_p. Remove processes + that exit from the process table. + (linux_wait): Add `ptid' argument. Change return type to ptid_t. + Adjust. + (mark_lwp_dead): New. + (wait_for_sigstop): Adjust to use ptids. If a process exits while + stopping all threads, mark its main lwp as dead. + (linux_set_resume_request, linux_resume_one_thread): Adjust to use + ptids. + (fetch_register, usr_store_inferior_registers) + (regsets_fetch_inferior_registers) + (regsets_store_inferior_registers, linux_read_memory) + (linux_write_memory): Inline `inferior_pid'. + (linux_look_up_symbols): Adjust to use per-process + `thread_db_active'. + (linux_request_interrupt): Adjust to use ptids. + (linux_read_auxv): Inline `inferior_pid'. + (initialize_low): Don't reference thread_db_active. + * gdb_proc_service.h (struct ps_prochandle) : Remove. + * proc-service.c (ps_lgetregs): Use find_lwp_pid. + (ps_getpid): Return the pid of the current inferior. + * thread-db.c (proc_handle, thread_agent): Delete. + (thread_db_create_event, thread_db_enable_reporting): Adjust to + per-process data. + (find_one_thread): Change argument type to ptid_t. Adjust to + per-process data. + (maybe_attach_thread): Adjust to per-process data and ptids. + (thread_db_find_new_threads): Ditto. + (thread_db_init): Ditto. + * spu-low.c (spu_create_inferior, spu_attach): Add process to + processes table. Adjust to use ptids. + (spu_kill, spu_detach): Adjust interface. Remove process from + processes table. + (spu_join, spu_thread_alive): Adjust interface. + (spu_wait): Adjust interface. Remove process from processes + table. Adjust to use ptids. + * win32-low.c (current_inferior_tid): Delete. + (current_inferior_ptid): New. + (debug_event_ptid): New. + (thread_rec): Take a ptid. Adjust. + (child_add_thread): Add `pid' argument. Adjust to use ptids. + (child_delete_thread): Ditto. + (do_initial_child_stuff): Add `attached' argument. Add process to + processes table. + (child_fetch_inferior_registers, child_store_inferior_registers): + Adjust. + (win32_create_inferior): Pass 0 to do_initial_child_stuff. + (win32_attach): Pass 1 to do_initial_child_stuff. + (win32_kill): Adjust interface. Remove process from processes + table. + (win32_detach): Ditto. + (win32_join): Adjust interface. + (win32_thread_alive): Take a ptid. + (win32_resume): Adjust to use ptids. + (get_child_debug_event): Ditto. + (win32_wait): Adjust interface. Remove exiting process from + processes table. + +2009-04-01 Pedro Alves + + Non-stop mode support. + + * server.h (non_stop): Declare. + (gdb_client_data, handler_func): Declare. + (delete_file_handler, add_file_handler, start_event_loop): + Declare. + (handle_serial_event, handle_target_event, push_event) + (putpkt_notif): Declare. + * target.h (enum resume_kind): New. + (struct thread_resume): Replace `step' field by `kind' field. + (TARGET_WNOHANG): Define. + (struct target_ops) : Add `options' argument. + : New fields. + (target_supports_non_stop, target_async): New. + (start_non_stop): Declare. + (mywait): Add `options' argument. + * target.c (mywait): Add `options' argument. Print child exit + notifications here. + (start_non_stop): New. + * server.c (non_stop, own_buf, mem_buf): New globals. + (struct vstop_notif): New. + (notif_queue): New global. + (queue_stop_reply, push_event, discard_queued_stop_replies) + (send_next_stop_reply): New. + (start_inferior): Adjust to use resume_kind. Adjust to mywait + interface changes. + (attach_inferior): In non-stop mode, don't wait for the target + here. + (handle_general_set): Handle QNonStop. + (handle_query): When handling qC, return the current general + thread, instead of the first thread of the list. + (handle_query): If the backend supports non-stop mode, include + QNonStop+ in the qSupported query response. + (handle_v_cont): Adjust to use resume_kind. Handle resume_stop + and non-stop mode. + (handle_v_attach, handle_v_run): Handle non-stop mode. + (handle_v_stopped): New. + (handle_v_requests): Report support for vCont;t. Handle vStopped. + (myresume): Adjust to use resume_kind. Handle non-stop. + (queue_stop_reply_callback): New. + (handle_status): Handle non-stop mode. + (main): Clear non_stop flag on reconnection. Use the event-loop. + Refactor serial protocol handling from here ... + (process_serial_event): ... to this new function. When GDB + selects any thread, select one here. In non-stop mode, wait until + GDB acks all pending events before exiting. + (handle_serial_event, handle_target_event): New. + * remote-utils.c (remote_open): Install remote_desc in the event + loop. + (remote_close): Remove remote_desc from the event loop. + (putpkt_binary): Rename to... + (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it. + (putpkt_binary): New as wrapper around putpkt_binary_1. + (putpkt_notif): New. + (prepare_resume_reply): In non-stop mode, don't change the + general_thread. + * event-loop.c: New. + * Makefile.in (OBJ): Add event-loop.o. + (event-loop.o): New rule. + + * linux-low.h (pid_of): Moved here. + (lwpid_of): New. + (get_lwp_thread): Use lwpid_of. + (struct lwp_info): Delete `lwpid' field. Add `suspended' field. + * linux-low.c (pid_of): Delete. + (inferior_pid): Use lwpid_of. + (linux_event_pipe): New. + (target_is_async_p): New. + (delete_lwp): New. + (handle_extended_wait): Use lwpid_of. + (add_lwp): Don't set lwpid field. + (linux_attach_lwp): Adjust debug output. Use lwpid_of. + (linux_kill_one_lwp): If killing a running lwp, stop it first. + Use lwpid_of. Adjust to linux_wait_for_event interface changes. + (linux_detach_one_lwp): If detaching from a running lwp, stop it + first. Adjust to linux_wait_for_event interface changes. Use + lwpid_of. + (linux_detach): Don't delete the main lwp here. + (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of. + (status_pending_p): Don't consider explicitly suspended lwps. + (linux_wait_for_lwp): Take an integer pid instead of a lwp_info + pointer. Add OPTIONS argument. Change return type to int. Use + my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of. + (linux_wait_for_event): Take an integer pid instead of a lwp_info + pointer. Add status pointer argument. Return a pid instead of a + status. Use lwpid_of. Adjust to linux_wait_for_lwp interface + changes. In non-stop mode, don't switch to a random thread. + (linux_wait): Rename to... + (linux_wait_1): ... this. Add target_options argument, and handle + it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode, + don't handle the continue thread. Handle TARGET_WNOHANG. Merge + clean exit and signal exit code. Don't stop all threads in + non-stop mode. In all-stop mode, only stop all threads when + reporting a stop to GDB. Handle explicit thread stop requests. + (async_file_flush, async_file_mark): New. + (linux_wait): New. + (send_sigstop): Use lwpid_of. + (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event + interface changes. In non-stop mode, don't switch to a random + thread. + (linux_resume_one_lwp): Use lwpid_of. + (linux_continue_one_thread, linux_queue_one_thread): Merge into ... + (linux_resume_one_thread): ... this. Handle resume_stop. In + non-stop mode, don't look for pending flag in all threads. + (resume_status_pending_p): Don't consider explicitly suspended + threads. + (my_waitpid): Reimplement. Emulate __WALL. + (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo): + Use lwpid_of. + (sigchld_handler, linux_supports_non_stop, linux_async) + (linux_start_non_stop): New. + (linux_target_ops): Register linux_supports_non_stop, linux_async + and linux_start_non_stop. + (initialize_low): Install SIGCHLD handler. + * thread-db.c (thread_db_create_event, find_one_thread) + (thread_db_get_tls_address): Use lwpid_of. + * win32-low.c (win32_detach): Adjust to use resume_kind. + (win32_wait): Add `options' argument. + * spu-low.c (spu_resume): Adjust to use resume_kind. + (spu_wait): Add `options' argument. + +2009-04-01 Pedro Alves + + Decouple target code from remote protocol. + + * target.h (enum target_waitkind): New. + (struct target_waitstatus): New. + (struct target_ops) : Return an unsigned long. Take a + target_waitstatus pointer instead of a char pointer. + (mywait): Likewise. + * target.c (mywait): Change prototype to return an unsigned long. + Take a target_waitstatus pointer instead of a char pointer. Adjust. + * server.h (thread_from_wait, old_thread_from_wait): Delete + declarations. + (prepare_resume_reply): Change prototype to take a + target_waitstatus. + * server.c (thread_from_wait, old_thread_from_wait): Delete. + (last_status, last_ptid): New. + (start_inferior): Remove "statusptr" argument. Adjust. Return a + pid instead of a signal. + (attach_inferior): Remove "status" and "signal" parameters. + Adjust. + (handle_query): For qGetTLSAddr, parse the thread id with strtol, + not as an address. + (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill) + (handle_v_requests, myresume): Remove "status" and "signal" + parameters. Adjust. + (handle_status): New. + (main): Delete local `status'. Adjust. + * remote-utils.c: Include target.h. + (prepare_resume_reply): Change prototype to take a + target_waitstatus. Adjust. + + * linux-low.c (linux_wait): Adjust to new target_ops->wait + interface. + * spu-low.c (spu_wait): Adjust. + * win32-low.c (enum target_waitkind, struct target_waitstatus): + Delete. + (win32_wait): Adjust. + +2009-04-01 Pedro Alves + + * target.h (struct thread_resume): Delete leave_stopped member. + (struct target_ops): Add a `n' argument to the `resume' callback. + * server.c (start_inferior): Adjust. + (handle_v_cont, myresume): Adjust. + * linux-low.c (check_removed_breakpoint): Adjust to resume + interface change, and to removed leave_stopped field. + (resume_ptr): Delete. + (struct thread_resume_array): New. + (linux_set_resume_request): Add new `arg' parameter. Adjust to + resume interface change. + (linux_continue_one_thread, linux_queue_one_thread) + (resume_status_pending_p): Check if the resume field is NULL + instead of checking the leave_stopped member. + (linux_resume): Adjust to the target resume interface change. + * spu-low.c (spu_resume): Adjust to the target resume interface + change. + * win32-low.c (win32_detach, win32_resume): Ditto. + +2009-04-01 Pedro Alves + + * linux-low.c (linux_wait_for_event): Don't clear the `stepping' + flag. + (wait_for_sigstop): Don't leave a finished single-step SIGTRAP + pending. + (linux_continue_one_thread): Only preserve the stepping flag if + there's a pending breakpoint. + +2009-03-31 Pedro Alves + + * server.c (main): After the inferior having exited, call + remote_close before exiting gdbserver. + +2009-03-25 Thiago Jung Bauermann + + Fix size of FPSCR in Power 7 processors. + * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define. + (PPC_FEATURE_HAS_DFP): New #define. + (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on + size of the FPSCR. + +2009-03-23 Pedro Alves + + * server.c (handle_query) Whitespace and formatting. + +2009-03-22 Pedro Alves + + * i387-fp.c, linux-arm-low.c, linux-cris-low.c, + linux-crisv32-low.c, linux-i386-low.c, linux-low.c, + linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c, + linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c, + regcache.c, remote-utils.c, server.c, spu-low.c, target.h, + thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c, + Makefile.in, configure.ac: Fix whitespace throughout. + * configure: Regenerate. + +2009-03-22 Pedro Alves + + * inferiors.c (find_inferior): Make it safe for the callback + function to delete the currently iterated inferior. + +2009-03-22 Pedro Alves + + * Makefile.in (linuw_low_h): Move higher. + (thread-db.o): Depend on $(linux_low_h). + +2009-03-17 Pedro Alves + + Rename "process" to "lwp" throughout. + + * linux-low.c (all_processes): Rename to... + (all_lwps): ... this. + (inferior_pid, handle_extended_wait, get_stop_pc): Adjust. + (add_process): Rename to ... + (add_lwp): ... this. Adjust. + (linux_create_inferior): Adjust. + (linux_attach_lwp): Adjust. + (linux_attach): Adjust. + (linux_kill_one_process): Rename to ... + (linux_kill_one_lwp): ... this. Adjust. + (linux_kill): Adjust. + (linux_detach_one_process): Rename to ... + (linux_detach_one_lwp): ... this. Adjust. + (linux_detach): Adjust. + (check_removed_breakpoint): Adjust. + (status_pending_p): Adjust. + (linux_wait_for_process): Rename to ... + (linux_wait_for_lwp): ... this. Adjust. + (linux_wait_for_event): Adjust. + (send_sigstop): Adjust. + (wait_for_sigstop): Adjust. + (stop_all_processes): Rename to ... + (stop_all_lwps): ... this. + (linux_resume_one_process): Rename to ... + (linux_resume_one_lwp): ... this. Adjust. + (linux_set_resume_request, linux_continue_one_thread) + (linux_queue_one_thread, resume_status_pending_p) + (usr_store_inferior_registers, regsets_store_inferior_registers) + (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo): + Adjust. + * linux-low.h (get_process): Rename to ... + (get_lwp): ... this. Adjust. + (get_thread_process): Rename to ... + (get_thread_lwp): ... this. Adjust. + (get_process_thread): Rename to ... + (get_lwp_thread): ... this. Adjust. + (struct process_info): Rename to ... + (struct lwp_info): ... this. + (all_processes): Rename to ... + (all_lwps): ... this. + * proc-service.c (ps_lgetregs): Adjust. + * thread-db.c (thread_db_create_event, find_one_thread) + (maybe_attach_thread, thread_db_get_tls_address): Adjust. + +2009-03-14 Pedro Alves + + * server.c (handle_query): Handle "qAttached". + +2009-03-13 Nathan Sidwell + + * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to + GPLv3, update license URL. + +2009-03-01 Doug Evans + + * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common. + (server_h): Add gdb_signals.h. + (signals.o): Update. + * server.h (target_signal_from_host,target_signal_to_host_p) + (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h. + +2009-02-14 Pierre Muller + + * remote-utils.c (getpkt): Also generate remote-debug + information if noack_mode is set. + +2009-02-06 Pedro Alves + + * server.c (handle_query): Report qXfer:siginfo:read and + qXfer:siginfo:write as supported and handle them. + * target.h (struct target_ops) : New field. + * linux-low.c (linux_xfer_siginfo): New. + (linux_target_ops): Set it. + +2009-01-26 Pedro Alves + + * server.c (gdbserver_usage): Mention --remote-debug. + (main): Accept '--remote-debug' switch. + +2009-01-18 Doug Evans + + * regcache.c (new_register_cache): No need to check result of xcalloc. + * server.c (handle_search_memory): Back out calls to xmalloc, + result is checked and error is returned to user upon failure. + (handle_query): Ditto. Add more checks for result of malloc. + (handle_v_cont): Check result of malloc, report error back to + user upon failure. + (handle_v_run): Ditto. Call freeargv. + * server.h (freeargv): Declare. + * utils.c (freeargv): New fn. + +2009-01-15 Doug Evans + + * gdbreplay.c (perror_with_name): Make arg const char *. + * server.h (target_signal_to_name): Make return type const char *. + * thread-db.c (thread_db_err_str): Make return type const char *. + * utils.c (perror_with_name): Make arg const char *. + +2009-01-14 Pedro Alves + + * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE + when handling a EXIT_PROCESS_DEBUG_EVENT. + +2009-01-06 Joel Brobecker + + * gdbreplay.c (gdbreplay_version): Update copyright year. + * server.c (gdbserver_version): Likewise. + +2009-01-05 Doug Evans + + * linux-low.c (linux_attach_lwp): Add some comments/fixmes. + (handle_extended_wait): Improve comment. + +2008-12-13 Doug Evans + + * utils.c (xmalloc,xcalloc,xstrdup): New fns. + * server.h (ATTR_MALLOC): New macro. + (xmalloc,xcalloc,xstrdup): Declare. + * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup. + * inferiors.c: Ditto. + * linux-low.c: Ditto. + * mem-break.c: Ditto. + * regcache.c: Ditto. + * remote-utils.c: Ditto. + * server.c: Ditto. + * target.c: Ditto. + * win32-low.c: Ditto. + +2008-12-12 Doug Evans + + * linux-low.c (linux_wait_for_process): Don't clobber current_inferior + in debugging printf. + + * linux-low.c (handle_extended_wait): Simplify, use my_waitpid. + +2008-12-09 Doug Evans + + * linux-low.h (struct process_info): Delete member tid, unused. + * thread-db.c (find_one_thread): Update. + (maybe_attach_thread): Update. + +2008-12-02 Pedro Alves + + * target.h (struct target_ops): Add qxfer_osdata member. + * linux-low.c: Include ctype.h and pwd.h and sys/types.h + and dirent.h. + (linux_qxfer_osdata): New functions. + (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata + callback. + * server.c (handle_query): Handle "qXfer:osdata:read:". + * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish) + (buffer_xml_printf): New functions. + * server.h (struct buffer): New. + (buffer_grow_str, buffer_grow_str0): New macros. + (buffer_grow, buffer_free, buffer_init, buffer_finish) + (buffer_xml_printf): Declare. + +2008-11-24 Doug Evans + + * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused. + +2008-11-24 Daniel Jacobowitz + + * server.c (handle_v_run): Always use the supplied argument list. + +2008-11-19 Bob Wilson + + * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4. + (xtensa_regmap_table): Add entry for scompare1. + +2008-11-18 Thiago Jung Bauermann + + * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c, + powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c, + powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c, + powerpc-isa205-64l.o, powerpc-isa205-64l.c, + powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c, + powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets. + * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and + XML target descriptions. + * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR + when inferior is running on an ISA 2.05 or later processor. Add + special case to return offset for full 64-bit slot of FPSCR when + in 32-bits. + +2008-11-14 Daniel Gutson + + * Makefile.in (SFILES, clean): Added sparc64 files. + (reg-sparc64.o, reg-sparc64.c): New. + * configure.srv (sparc*-*-linux*): New configuration. + * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace + syscall arguments for SPARC. + (regsets_store_inferior_registers): Likewise. + * linux-sparc-low.c: New file. + +2008-10-21 Doug Evans + + * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete. + (READLINE_DIR,READLINE_DEP): Delete. + (INTERNAL_CFLAGS): Update. + (LINTFLAGS): Update. + +2008-10-10 Pedro Alves + + * server.c (handle_v_run): If GDB didn't specify an argv, use the + whole argv from the last run, not just argv[0]. + +2008-09-08 Pedro Alves + + * regcache.c (new_register_cache): Return NULL if the register + cache size isn't known yet. + (free_register_cache): Avoid dereferencing a NULL regcache. + +2008-09-04 Daniel Jacobowitz + + * configure.srv: Merge MIPS and MIPS64. + +2008-08-24 Maciej W. Rozycki + + * Makefile.in (uninstall): Apply $(EXEEXT) too. + +2008-08-18 Luis Machado + + * Makefile.in: Add required vsx dependencies. + + * linux-ppc-low: Define PPC_FEATURE_HAS_VSX. + Declare init_registers_powerpc_vsx32l. + Declare init_registers_powerpc_vsx64l. + Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS. + (ppc_arch_setup): Check for VSX in hwcap. + (ppc_fill_vsxregset): New function. + (ppc_store_vsxregset): New function. + Add new VSX entry in regset_info target_regsets. + + * configure.srv: Add new VSX dependencies. + +2008-08-12 Pedro Alves + + * remote-utils.c (noack_mode, transport_is_reliable): New globals. + (remote_open): Set or clear transport_is_reliable. + (putpkt_binary): Don't expect acks in noack mode. + (getpkt): Don't send ack/nac in noack mode. + * server.c (handle_general_set): Handle QStartNoAckMode. + (handle_query): If connected by tcp pass QStartNoAckMode+ in + qSupported. + (main): Reset noack_mode on every connection. + * server.h (noack_mode): Declare. + +2008-08-07 Ralf Wildenhues + + * Makefile.in (GDBREPLAY_OBS): New variable. + (gdbreplay$(EXEEXT)): Use it to avoid unportable $^. + +2008-08-05 Ulrich Weigand + Daniel Jacobowitz + + * linux-low.c (linux_resume_one_process): Ignore ESRCH. + (usr_store_inferior_registers): Likewise. + (regsets_store_inferior_registers): Likewise. + +2008-07-31 Rolf Jansen + Pedro Alves + + * configure.ac: Check for memmem declaration. + * server.c [HAVE_MALLOC_H]: Include malloc.h. + (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC) + (disable_packet_qfThreadInfo): Unconditionally compile. + * server.h [!HAVE_DECL_MEMMEM]: Declare memmem. + * configure, config.in: Regenerate. + +2008-07-28 Doug Kwan + + * linux-low.c (sys/dir.h, sys/user.h): Remove includes. + (linux_write_memory): Remove declaration of errno. + +2008-07-12 Ulrich Weigand + + * linux-low.c (handle_extended_wait): Do not use "status" + variable uninitialized. + +2008-07-07 Pedro Alves + + * server.c (handle_v_attach): Inhibit reporting dll changes. + +2008-06-27 Pedro Alves + + * remote-utils.c (prepare_resume_reply): If requested, don't + output "thread:TID" in the T stop reply. + + * server.c (disable_packet_vCont, disable_packet_Tthread) + (disable_packet_qC, disable_packet_qfThreadInfo): New globals. + (handle_query): If requested, disable support for qC, qfThreadInfo + and qsThreadInfo. + (handle_v_requests): If requested, disable support for vCont. + (gdbserver_show_disableable): New. + (main): Handle --disable-packet and --disable-packet=LIST. + + * server.h (disable_packet_vCont, disable_packet_Tthread) + (disable_packet_qC, disable_packet_qfThreadInfo): Declare. + +2008-06-20 Carlos O'Donell + + * server.c (gdbserver_usage): Mention --version. + +2008-06-06 Daniel Jacobowitz + + * Makefile.in (gdbreplay.o): New rule. + +2008-06-06 Joseph Myers + + * gdbreplay.c (gdbreplay_version): Say gdbreplay in version + message, not gdbserver. + +2008-06-05 Vladimir Prus + Nathan Sidwell + Joseph Myers + + * acinclude.m4: Include ../../config/acx.m4. + * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. + * configure, config.in: Regenerate. + * Makefile.in (gdbreplay$(EXEEXT)): Add version.o. + * server.c (gdbserver_version): Print PKGVERSION. + (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO. + (main): Adjust gdbserver_usage calls. + * gdbreplay.c (version, host_name): Add declarations. + (gdbreplay_version, gdbreplay_usage): New. + (main): Accept --version and --help options. + +2008-06-04 Daniel Jacobowitz + + * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New. + (arm_breakpoint_at): Handle Thumb. + (the_low_target): Add comment. + +2008-05-29 Ulrich Weigand + + * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer. + +2008-05-09 Doug Evans + + * server.h (decode_search_memory_packet): Declare. + * remote-utils.c (decode_search_memory_packet): New fn. + * server.c (handle_search_memory_1): New fn. + (handle_search_memory): New fn. + (handle_query): Process qSearch:memory packets. + +2008-05-08 Ulrich Weigand + + * regcache.c (registers_length): Remove. + (set_register_cache): Verify that PBUFSIZ is large enough to hold a + full register packet. + * regcache.h (registers_length): Remove prototype. + * server.h (PBUFSIZ): Define to 16384. + +2008-05-03 Ulrich Weigand + + * configure.srv (powerpc*-*-linux*): Set srv_regobj to + powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o, + powerpc-64l.o, and powerpc-altivec64l.o. + Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and + rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml, + rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml, + rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml, + rs6000/power-linux.xml, and rs6000/power64-linux.xml + to srv_xmlfiles. + + * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ... + (powerpc-32l.o, powerpc-32l.c): ... these new rules. + (powerpc-32.o, powerpc-32.c): Remove, replace by ... + (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules. + (powerpc-e500.o, powerpc-e500.c): Remove, replace by ... + (powerpc-e500l.o, powerpc-e500l.c): ... these new rules. + (reg-ppc64.o, reg-ppc64.c): Remove, replace by ... + (powerpc-64l.o, powerpc-64l.c): ... these new rules. + (powerpc-64.o, powerpc-64.c): Remove, replace by ... + (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules. + (clean): Update. + + * linux-ppc-low.c (init_registers_ppc): Remove, replace by ... + (init_registers_powerpc_32l): ... this new prototype. + (init_registers_powerpc_32): Remove, replace by ... + (init_registers_powerpc_altivec32l): ... this new prototype. + (init_registers_powerpc_e500): Remove, replace by ... + (init_registers_powerpc_e500l): ... this new prototype. + (init_registers_ppc64): Remove, replace by ... + (init_registers_powerpc_64l): ... this new prototype. + (init_registers_powerpc_64): Remove, replace by ... + (init_registers_powerpc_altivec64l): ... this new prototype. + (ppc_num_regs): Set to 73. + (PT_ORIG_R3, PT_TRAP): Define if necessary. + (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap. + (ppc_cannot_store_register): Handle orig_r3 and trap. + (ppc_arch_setup): Update init_registers_... calls. + (ppc_fill_gregset): Handle orig_r3 and trap. + + * inferiors.c (clear_inferiors): Reset current_inferior. + +2008-04-23 Paolo Bonzini + + * acinclude.m4: Add override.m4. + * configure: Regenerate. + +2008-04-21 Ulrich Weigand + + * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the + initial call to init_register_ppc64. + +2008-04-21 Ulrich Weigand + + * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single + powerpc*-*-linux* case. + (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case. + +2008-04-17 Ulrich Weigand + + * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from + srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml + from reg_xmlfiles. + * linux-ppc-low.c: Include . + (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define. + (ppc_hwcap): New global variable. + (ppc_regmap): Remove __SPE__ #ifdef sections. + (ppc_regmap_e500): New global variable. + (ppc_cannot_store_register): Update __SPE__ special case. + (ppc_get_hwcap): New function. + (ppc_arch_setup): Use it to determine whether inferior supports + AltiVec or SPE registers. Set the_low_target.regmap if appropriate. + (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally. + Do not access registers if target does not support AltiVec. + (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally. + Do not access registers if target does not support SPE. + (target_regsets): Unconditionally include AltiVec and SPE regsets. + +2008-04-17 Daniel Jacobowitz + + * linux-low.c (disabled_regsets, num_regsets): New. + (use_regsets_p): Delete. + (linux_wait_for_process): Clear disabled_regsets. + (regsets_fetch_inferior_registers): Check and set it. + (regsets_store_inferior_registers): Likewise. + (linux_fetch_registers, linux_store_registers): Do not use + use_regsets_p. + (initialize_low): Allocate disabled_regsets. + +2008-04-14 Daniel Jacobowitz + + * Makefile.in (LIBOBJS): New. + (OBS): Use LIBOBJS. + (memmem.o): New rule. + * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem. + * configure: Regenerated. + +2008-04-04 Ulrich Weigand + + * server.c (handle_query): Never return "unsupported" for + qXfer:features:read queries. + +2008-03-27 Ulrich Weigand + + * server.c (get_features_xml): Fix inverted condition. + (handle_query): Always support qXfer:feature:read. + +2008-03-10 Daniel Jacobowitz + + * server.c (wrapper_argv): New. + (start_inferior): Handle wrapper_argv. If set, expect an extra + trap. + (gdbserver_usage): Document --wrapper. + (main): Parse --wrapper. + +2008-02-28 Ulrich Weigand + + * configure.srv [powerpc64-*-linux*]: Add all files mentioned for + powerpc-*-linux* to srv_regobj and reg_xmlfiles. + * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation. + (ppc_set_pc): Likewise. + (ppc_arch_setup): New function. + (ppc_fill_gregset): Call ppc_collect_ptrace_register instead + of collect_register. + (the_low_target): Use ppc_arch_setup as arch_setup initializer. + +2008-02-28 Ulrich Weigand + + * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o + instead of linux-ppc64-low.o. + * linux-ppc64-low.c: Remove file. + * Makefile.in (SFILES): Remove linux-ppc64-low.c. + (linux-ppc64-low.o): Remove rule. + + * linux-ppc-low.c (init_registers_ppc64): Add prototype. + (init_registers_powerpc_64): Likewise. + (ppc_regmap): Conditionally define depending on __powerpc64__. + (ppc_cannot_store_register): Do not special-case "fpscr" when + compiled on __powerpc64__. + (ppc_collect_ptrace_register): New function. + (ppc_supply_ptrace_register): New function. + (ppc_breakpoint): Change type to "unsigned int". + (ppc_breakpoint_at): Change type of "insn" to "unsigned int". + (the_low_target): Conditionally provide initializers for the + arch_setup member depending on __powerpc64__. Install + collect_ptrace_register and supply_ptrace_register members. + +2008-02-28 Ulrich Weigand + + * regcache.h (gdbserver_xmltarget): Add extern declaration. + * server.c (gdbserver_xmltarget): Define. + (get_features_xml): Use it to replace "target.xml" and arch_string. + + * configure.srv: Remove srv_xmltarget. Add XML files that were + mentioned there to srv_xmlfiles instead. Remove conditional tests + on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set + srv_xmlfiles and srv_regobj to include all possible choices. + * configure.ac (srv_xmltarget): Remove. + (srv_xmlfiles): Do not add "target.xml". + (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove + checks for supplementary target information. + * configure: Regenerate. + * Makefile.in (XML_TARGET): Remove. + (target.xml): Remove rule. + (clean): Do not clean up target.xml. + (.PRECIOUS): Do not mention target.xml. + + * target.h (struct target_ops): Remove arch_string member. + * linux-low.c (linux_arch_string): Remove. + (linux_target_ops): Remove arch_string initializer. + * linux-low.h (struct linux_target_ops): Remove arch_string member. + * linux-i386-low.c (the_low_target): Remove arch_string initializer. + * linux-x86-64-low.c (the_low_target): Remove arch_string initializer. + * spu-low.c (spu_arch_string): Remove. + (spu_target_ops): Remove arch_string initializer. + * win32-low.c (win32_arch_string): Remove. + (win32_target_ops): Remove arch_string initializer. + * win32-low.h (struct win32_target_ops): Remove arch_string member. + * win32-arm-low.c (the_low_target): Remove arch_string initializer. + * win32-i368-low.c (the_low_target): Remove arch_string initializer. + +2008-02-27 Ulrich Weigand + + * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field + by collect_ptrace_register and supply_ptrace_register hooks. + * linux-low.c (fetch_register): Use supply_ptrace_register callback + instead of checking for the_low_target.left_pad_xfer. + (usr_store_inferior_registers): Use collect_ptrace_register callback + instead of checking for the_low_target.left_pad_xfer. + + * linux-s390-low.c (s390_collect_ptrace_register): New function. + (s390_supply_ptrace_register): Likewise. + (s390_fill_gregset): Call s390_collect_ptrace_register. + (the_low_target): Update. + + * linux-ppc64-low.c (ppc_collect_ptrace_register): New function. + (ppc_supply_ptrace_register): Likewise. + (the_low_target): Update. + + * linux-i386-low.c (the_low_target): Update. + * linux-x86-64-low.c (the_low_target): Update. + +2008-02-27 Ulrich Weigand + + * configure.srv [s390x-*-linux*]: Set srv_regobj to include both + reg-s390.o and reg-s390x.o. + + * linux-low.c (new_inferior): New global variable. + (linux_create_inferior, linux_attach): Set it. + (linux_wait_for_process): Call the_low_target.arch_setup after the + target has stopped for the first time. + (initialize_low): Do not call the_low_target.arch_setup. + + * linux-s390-low.c (s390_get_pc): Support bi-arch operation. + (s390_set_pc): Likewise. + (s390_arch_setup): New function. + (the_low_target): Use s390_arch_setup as arch_setup routine. + + * regcache.c (realloc_register_cache): New function. + (set_register_cache): Call it for each existing regcache. + +2008-02-27 Ulrich Weigand + + * server.h (init_registers): Remove prototype. + + * linux-low.h (struct linux_target_ops): Add arch_setup field. + * linux-low.c (initialize_low): Call the_low_target.arch_setup () + instead of init_registers (). + * linux-arm-low.c (init_registers_arm): Add prototype. + (init_registers_arm_with_iwmmxt): Likewise. + (the_low_target): Add initializer for arch_setup field. + * linux-cris-low.c (init_registers_cris): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-crisv32-low.c (init_registers_crisv32): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-i386-low.c (init_registers_i386_linux): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-ia64-low.c (init_registers_ia64): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-m32r-low.c (init_registers_m32r): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-m68k-low.c (init_registers_m68k): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-mips-low.c (init_registers_mips_linux): Add prototype. + (init_registers_mips64_linux): Likewise. + (the_low_target): Add initializer for arch_setup field. + * linux-ppc-low.c (init_registers_ppc): Add prototype. + (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise. + (the_low_target): Add initializer for arch_setup field. + * linux-ppc64-low.c (init_registers_ppc64): Add prototype. + (init_registers_powerpc_64): Likewise. + (the_low_target): Add initializer for arch_setup field. + * linux-s390-low.c (init_registers_s390): Add prototype. + (init_registers_s390x): Likewise. + (the_low_target): Add initializer for arch_setup field. + * linux-sh-low.c (init_registers_sh): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * linux-xtensa-low.c (init_registers_xtensa): Add prototype. + (the_low_target): Add initializer for arch_setup field. + + * win32-low.h (struct win32_target_ops): Add arch_setup field. + * win32-low.c (initialize_low): Call the_low_target.arch_setup () + instead of init_registers (). + * win32-arm-low.c (init_registers_arm): Add prototype. + (the_low_target): Add initializer for arch_setup field. + * win32-i386-low.c (init_registers_i386): Add prototype. + (the_low_target): Add initializer for arch_setup field. + + * spu-low.c (init_registers_spu): Add prototype. + (initialize_low): Call initialie_registers_spu () instead of + initialize_registers (). + +2008-02-19 Pedro Alves + + * server.c (handle_v_requests): When handling the vRun and vAttach + packets, if already debugging a process, don't kill it. Return an + error instead. + +2008-02-17 Daniel Jacobowitz + + * server.c (handle_query): Correct length check. + +2008-02-14 Pedro Alves + + * win32-low.c (do_initial_child_stuff): Add process handle + parameter. Set current_process_handle and current_process_id from the + parameters. Clear globals. + (win32_create_inferior): Don't set current_process_handle and + current_process_id here. Instead pass them on the call to + do_initial_child_stuff. + (win32_attach): Likewise. + (win32_clear_inferiors): New. + (win32_kill): Don't close the current process handle or the + current thread handle here. Instead call win32_clear_inferiors. + (win32_detach): Don't open a new handle to the process. Call + win32_clear_inferiors. + (win32_join): Don't rely on current_process_handle; open a new + handle using the process id. + (win32_wait): Call win32_clear_inferiors when the inferior process + has exited. + +2008-02-14 Daniel Jacobowitz + + * server.c (monitor_show_help): Add "exit". + +2008-02-11 Maxim Grigoriev + + * Makefile.in (SFILES): Add linux-xtensa-low.c. + (clean): Add reg-xtensa.c. + (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies. + * configure.srv (xtensa*-*-linux*) New target. + * linux-xtensa-low.c: New. + * xtensa-xtregs.c: New. + +2008-02-01 Pedro Alves + + * hostio.c: Don't include errno.h. + (errno_to_fileio_errno): Move to hostio-errno. + * hostio.c: (hostio_error): Remove the error parameter. Defer the + error number outputting to the target->hostio_last_error callback. + (hostio_packet_error): Use FILEIO_EINVAL directly. + (handle_open, handle_pread, hostio_error, handle_unlink): Update + calls to hostio_error. + * hostio-errno.c: New. + * server.h (hostio_last_error_from_errno): Declare. + * target.h (target_ops): Add hostio_last_error member. + * linux-low.c (linux_target_op): Register hostio_last_error_from_errno + as hostio_last_error handler. + * spu-low.c (spu_target_ops): Likewise. + * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error) + (wince_hostio_last_error): New functions. + (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error + as hostio_last_error handler. + (win32_target_ops) [!_WIN32_WCE]: Register + hostio_last_error_from_errno as hostio_last_error handler. + * Makefile.in (SFILES): Add hostio.c and hostio-errno.c. + (hostio-errno.o): New rule. + * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs. + * configure.srv (srv_hostio_err_objs): New variable. Default to + hostio-errno.o. + (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "". + * configure: Regenerate. + +2008-01-29 Daniel Jacobowitz + + * linux-low.c (linux_attach_lwp): Do not _exit after errors. + (linux_kill, linux_detach): Clean up the process list. + * remote-utils.c (remote_open): Improve port number parsing. + (putpkt_binary, input_interrupt): Only send interrupts if the target + is running. + * server.c (extended_protocol): Make static. + (attached): Define earlier. + (exit_requested, response_needed, program_argv): New variables. + (target_running): New. + (start_inferior): Clear attached here. + (attach_inferior): Set attached here. + (require_running): Define. + (handle_query): Use require_running and target_running. Implement + "monitor exit". + (handle_v_attach, handle_v_run): New. + (handle_v_requests): Use require_running. Handle vAttach and vRun. + (gdbserver_usage): Update. + (main): Redo argument parsing. Handle --debug and --multi. Handle + --attach along with other options or after the port. Save + program_argv. Support no initial program. Resynchronize + communication with GDB after an error. Handle "monitor exit". + Use require_running and target_running. Always allow the extended + protocol. Do not error out for Hc0 or Hc-1. Do not automatically + restart in extended mode. + * README: Refer to the GDB manual. Update --attach usage. + +2007-12-20 Andreas Schwab + + * linux-low.c (STACK_SIZE): Define. + (linux_tracefork_child): Use it. Use __clone2 on ia64. + (linux_test_for_tracefork): Likewise. + +2007-12-18 Daniel Jacobowitz + + * linux-low.c (linux_wait_for_event): Update messages. Do not + reinsert auto-delete breakpoints. + * mem-break.c (struct breakpoint): Change return type of handler to + int. + (set_breakpoint_at): Update handler type. + (reinsert_breakpoint_handler): Return 1 instead of calling + delete_breakpoint. + (reinsert_breakpoint_by_bp): Check for the original breakpoint before + setting a new one. + (check_breakpoints): Delete auto-delete breakpoints and return 2. + * mem-break.h (set_breakpoint_at): Update handler type. + * thread-db.c (thread_db_create_event, thread_db_create_event): Update. + * win32-low.c (auto_delete_breakpoint): New. + (get_child_debug_event): Use it. + +2007-12-16 Daniel Jacobowitz + + * configure.ac: Check for pread and pwrite. + * hostio.c (handle_pread): Fall back to lseek and read. + (handle_pwrite): Fall back to lseek and write. + * config.in, configure: Regenerated. + +2007-12-07 Daniel Jacobowitz + + * server.c (myresume): Add own_buf argument. + (main): Update calls. + +2007-12-06 Daniel Jacobowitz + + * linux-low.c (linux_wait, linux_resume): Do not handle async I/O. + * remote-utils.c (remote_open): Do not call disable_async_io. + (block_async_io): Delete. + (unblock_async_io): Make static. + (initialize_async_io): New. + * server.c (handle_v_cont): Handle async I/O here. + (myresume): Likewise. Move other common resume tasks here... + (main): ... from here. Call initialize_async_io. Disable async + I/O before the main loop. + * server.h (initialize_async_io): Declare. + (block_async_io, unblock_async_io): Delete prototypes. + * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here. + +2007-12-06 Mick Davis + + * remote-utils.c (readchar): Allow binary data in received messages. + +2007-12-03 Pedro Alves + + * win32-low.c (attaching): New global. + (win32_create_inferior): Clear the `attaching' global. + (win32_attach): Set the `attaching' global. + (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when + attaching. Only set a breakpoint at the entry point if not + attaching. + +2007-12-03 Pedro Alves + + * server.c (main): Don't report dll events on the initial + connection on attaches. + +2007-12-03 Pedro Alves + + * server.c (main): Relax numerical bases supported for the pid of + the --attach command line argument. + +2007-12-03 Pedro Alves + + * win32-low.c (win32_attach): Call OpenProcess before + DebugActiveProcess, not after. Add last error output to error + call. + +2007-12-03 Pedro Alves + + * win32-low.c (win32_get_thread_context) + (win32_set_thread_context): New functions. + (thread_rec): Use win32_get_thread_context. + (continue_one_thread, win32_resume): Use win32_set_thread_context. + * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context' + field. + +2007-12-03 Leo Zayas + Pedro Alves + + * win32-low.c (soft_interrupt_requested, faked_breakpoint): New + global variables. + (child_add_thread): Minor cleanup. + (child_continue): Resume artificially suspended threads before + calling ContinueDebugEvent. + (suspend_one_thread): New. + (fake_breakpoint_event): New. + (get_child_debug_event): Change return type to int. Check here if + gdb sent an interrupt request. If a soft interrupt was requested, + fake a breakpoint event. Return 0 if there is no event to handle, + and 1 otherwise. + (win32_wait): Don't check here if gdb sent an interrupt request. + Ensure there is a valid event to handle. + (win32_request_interrupt): Add soft interruption method as last + resort. + +2007-12-03 Leo Zayas + Pedro Alves + + * win32-low.h (win32_thread_info): Add descriptions to the + structure members. Replace `suspend_count' counter by a + `suspended' flag. + * win32-low.c (thread_rec): Update condition of when to get the + context from the inferior. Rely on ContextFlags being set if it + has already been retrieved. Only suspend the inferior thread if + we haven't already. Warn if that fails. + (continue_one_thread): s/suspend_count/suspended/. Only call + ResumeThread once. Warn if that fails. + +2007-12-02 Pedro Alves + + * win32-low.c (win32_wait): Don't read from the inferior when it + has already exited. + +2007-12-02 Pedro Alves + + * Makefile.in (win32_low_h): New variable. + (win32-low.o): Add dependency on $(win32_low_h). + (win32-arm-low.o, win32-i386-low.o): New rules. + +2007-11-30 Daniel Jacobowitz + + * hostio.c: Correct copyright year. + +2007-11-30 Daniel Jacobowitz + + * Makefile.in (OBS): Add hostio.o. + (hostio.o): New rule. + * server.h (handle_vFile): Declare. + * hostio.c: New file. + * server.c (handle_v_requests): Take packet_len and new_packet_len + for binary packets. Call handle_vFile. + (main): Update call to handle_v_requests. + +2007-11-05 Daniel Jacobowitz + + * linux-low.c: Include . + +2007-11-01 Daniel Jacobowitz + + * linux-low.c (linux_tracefork_grandchild): New. + (linux_tracefork_child): Use clone. + (linux_test_for_tracefork): Use clone; allocate and free a stack. + +2007-10-31 Joel Brobecker + + * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh. + +2007-10-24 Daniel Jacobowitz + + * linux-low.c (handle_extended_wait): Handle unexpected signals. + +2007-10-23 Daniel Jacobowitz + + * inferiors.c (change_inferior_id): Delete. + (add_pid_to_list, pull_pid_from_list): New. + * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG) + (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK) + (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE) + (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK) + (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE) + (PTRACE_EVENT_EXIT, __WALL): Provide default definitions. + (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables. + (using_threads): Always set to 1. + (handle_extended_wait): New. + (add_process): Do not set TID. + (linux_create_inferior): Set must_set_ptrace_flags. + (linux_attach_lwp): Remove TID argument. Do not check using_threads. + Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers. + (linux_thread_alive): Rename TID argument to LWPID. + (linux_wait_for_process): Handle unknown processes. Do not use TID. + (linux_wait_for_event): Do not use TID or check using_threads. Update + call to dead_thread_notify. Call handle_extended_wait. + (linux_create_inferior): Use PTRACE_SETOPTIONS. + (send_sigstop): Delete sigstop_sent. + (wait_for_sigstop): Avoid TID. + (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid) + (linux_test_for_tracefork): New. + (linux_lookup_signals): Use thread_db_active and + linux_supports_tracefork_flag. + (initialize_low): Use thread_db_active and linux_test_for_tracefork. + * linux-low.h (get_process_thread): Avoid TID. + (struct process_ifo): Move thread_known and tid to the end. Remove + sigstop_sent. + (linux_attach_lwp, thread_db_init): Update prototypes. + * server.h (change_inferior_id): Delete prototype. + (add_pid_to_list, pull_pid_from_list): New prototypes. + * thread-db.c (thread_db_use_events): New. + (find_first_thread): Rename to... + (find_one_thread): ...this. Update callers and messages. Do not + call fatal. Check thread_db_use_events. Do not call + change_inferior_id or new_thread_notify. + (maybe_attach_thread): Update. Do not call new_thread_notify. + (thread_db_init): Set thread_db_use_events. Check use_events. + * utils.c (fatal, warning): Correct message prefix. + 2007-10-15 Daniel Jacobowitz * Makefile.in (clean): Remove new files. @@ -189,7 +3891,7 @@ 2007-05-16 Markus Deuling - * server.c (handle_query): Add reply for qC packet. + * server.c (handle_query): Add reply for qC packet. 2007-05-10 Pedro Alves Leo Zayas @@ -232,7 +3934,7 @@ (handle_exception): Change return type to void. Don't record context here. Set status to TARGET_WAITKIND_SPURIOUS on a first chance exception. - (get_child_debug_event): Change return type to void. Remove + (get_child_debug_event): Change return type to void. Remove goto loop. Always return after waiting for debug event. (win32_wait): Convert to switch statement. Handle spurious events. @@ -382,7 +4084,7 @@ (do_child_fetch_inferior_registers): Move to ... * win32-i386-low.c: ... here, and rename to ... (do_fetch_inferior_registers): ... this. - * win32-low.c (child_fetch_inferior_registers): + * win32-low.c (child_fetch_inferior_registers): Go through the low target. (do_child_store_inferior_registers): Use regptr. (strwinerror): New function. @@ -790,40 +4492,40 @@ 2005-12-23 Eli Zaretskii - * linux-arm-low.c: - * linux-arm-low.c: - * inferiors.c: - * i387-fp.h: - * i387-fp.c: - * gdbreplay.c: - * regcache.c: - * proc-service.c: - * mem-break.h: - * mem-break.c: - * linux-x86-64-low.c: - * linux-sh-low.c: - * linux-s390-low.c: - * linux-ppc64-low.c: - * linux-ppc-low.c: - * linux-mips-low.c: - * linux-m68k-low.c: - * linux-m32r-low.c: - * linux-low.h: - * linux-low.c: - * linux-ia64-low.c: - * linux-i386-low.c: - * linux-crisv32-low.c: - * thread-db.c: - * terminal.h: - * target.h: - * target.c: - * server.h: - * server.c: - * remote-utils.c: - * regcache.h: - * utils.c: - * Makefile.in: - * configure.ac: + * linux-arm-low.c: + * linux-arm-low.c: + * inferiors.c: + * i387-fp.h: + * i387-fp.c: + * gdbreplay.c: + * regcache.c: + * proc-service.c: + * mem-break.h: + * mem-break.c: + * linux-x86-64-low.c: + * linux-sh-low.c: + * linux-s390-low.c: + * linux-ppc64-low.c: + * linux-ppc-low.c: + * linux-mips-low.c: + * linux-m68k-low.c: + * linux-m32r-low.c: + * linux-low.h: + * linux-low.c: + * linux-ia64-low.c: + * linux-i386-low.c: + * linux-crisv32-low.c: + * thread-db.c: + * terminal.h: + * target.h: + * target.c: + * server.h: + * server.c: + * remote-utils.c: + * regcache.h: + * utils.c: + * Makefile.in: + * configure.ac: * gdbserver.1: Add (C) after Copyright. Update the FSF address. @@ -970,7 +4672,7 @@ * linux-crisv32-low.c: Ditto for CRISv32. * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c. (clean): Add reg-cris.c and reg-crisv32.c. - Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c, + Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c, reg-crisv32.o, and reg-crisv32.c to make rules. * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of recognized targets. @@ -983,7 +4685,7 @@ 2005-05-12 Orjan Friberg - * target.h (struct target_ops): Add insert_watchpoint, + * target.h (struct target_ops): Add insert_watchpoint, remove_watchpoint, stopped_by_watchpoint, stopped_data_address function pointers for hardware watchpoint support. * linux-low.h (struct linux_target_ops): Ditto.