summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
Commit message (Collapse)AuthorAgeFilesLines
* * linux-low.c (linux_wait_for_event): Do not pass signals whileDaniel Jacobowitz2007-09-042-3/+10
| | | | single-stepping.
* * win32-low.c (create_process): New.Pedro Alves2007-09-032-35/+67
| | | | | | | (win32_create_inferior): Use create_process instead of CreateProcess. If create_process failed retry appending an ".exe" suffix. Store the GetLastError result immediatelly after create_process calls and use it on the call to error.
* * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.Pedro Alves2007-09-032-3/+16
|
* Switch the license of all .c files to GPLv3.Joel Brobecker2007-08-2340-160/+80
| | | | | Switch the license of all .h files to GPLv3. Switch the license of all .cc files to GPLv3.
* * configure.ac: Switch license to GPLv3.Joel Brobecker2007-08-232-4/+6
|
* 2007-08-01 Michael Snyder <msnyder@access-company.com>Michael Snyder2007-08-012-0/+5
| | | | * remote-utils.c (putpkt_binary): Memory leak, free buf2.
* * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: NewPedro Alves2007-07-312-15/+39
| | | | | | | | | typedef. (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var. (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get CloseToolhelp32Snapshot. (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with CloseToolhelp32Snapshot.
* 2007-07-27 Michael Snyder <michael.snyder@access-company.com>Michael Snyder2007-07-272-2/+17
| | | | * server.c (main): Check for inferior exit before main loop.
* * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_descPedro Alves2007-07-182-1/+7
| | | | instead of on tmp_desc.
* 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>Daniel Jacobowitz2007-07-176-19/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daniel Jacobowitz <dan@codesourcery.com> * config/i386/cygwin.mt (TDEPFILES): Add solib-target.o. * coff-pe-read.c (read_pe_exported_syms): Delete verbose printf. * NEWS: Mention gdbserver DLL support. * gdb.base/unload.c (dlopen, dlsym, dlclose, dlerror): Define for __WIN32__. (SHLIB_NAME): Delete definition. Always pass dlerror to fprintf. * gdb.base/unload.exp: Use shared library test routines. * inferiors.c (all_dlls, dlls_changed, get_dll): New. (add_thread): Minor cleanups. (clear_inferiors): Move lower in the file. Clear the DLL list. (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New. * remote-utils.c (prepare_resume_reply): Check dlls_changed. (xml_escape_text): New. * server.c (handle_query): Handle qXfer:libraries:read. Report it for qSupported. (handle_v_cont): Report errors. (gdbserver_version): Update. (main): Correct size of own_buf. Do not report initial DLL events. * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll) (unloaded_dll, xml_escape_text): New. * win32-low.c (enum target_waitkind): Update comments. (win32_add_one_solib, get_image_name, winapi_EnumProcessModules) (winapi_GetModuleInformation, winapi_GetModuleFileNameExA) (win32_EnumProcessModules, win32_GetModuleInformation) (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name) (winapi_CreateToolhelp32Snapshot, winapi_Module32First) (winapi_Module32Next, win32_CreateToolhelp32Snapshot) (win32_Module32First, win32_Module32Next, load_toolhelp) (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New. (get_child_debug_event): Handle DLL events. (win32_wait): Likewise.
* * configure.srv: Set srv_linux_regsets for sh*-*-linux*.Daniel Jacobowitz2007-07-123-0/+23
| | | | * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
* * win32-low.c (handle_output_debug_string): Ignore event if notPedro Alves2007-07-082-1/+14
| | | | waiting.
* * win32-arm-low.c (arm_wince_breakpoint): Fix typo.Pedro Alves2007-07-082-1/+5
|
* 2007-07-03 Paul Gilliam <pgilliam@us.ibm.com>Daniel Jacobowitz2007-07-032-7/+30
| | | | | | | | | | | | | | | | | | | | | | | Thiago Bauermann <bauerman@br.ibm.com> Joseph S. Myers <joseph@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> gdb/ * remote.c (remote_check_symbols): Use gdbarch_convert_from_func_ptr_addr. * infcall.c (find_function_addr): Handle function descriptors without debugging information. * ppc-linux-tdep.c (ppc_linux_convert_from_func_ptr_addr): Renamed from ppc64_linux_convert_from_func_ptr_addr. Handle -msecure-plt. (ppc_linux_init_abi): Always set convert_from_func_ptr_addr. * solib-svr4.c (solib_break_names): Remove "._dl_debug_state". (bfd_lookup_symbol): Do not take a SECT_FLAGS argument. Always allow SEC_CODE and SEC_DATA. (enable_break): Update calls. Pass current_target to solib_add. Use gdbarch_convert_from_func_ptr_addr. gdb/gdbserver/ * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
* * inferiors.c (change_inferior_id): Add comment.Daniel Jacobowitz2007-07-027-46/+153
| | | | | | | | | | | | | | | | | | * linux-low.c (check_removed_breakpoint): Add an early prototype. Improve debug output. (linux_attach): Doc update. (linux_detach_one_process, linux_detach): Clean up before releasing each process. (send_sigstop, wait_for_sigstop): Improve comments and debug output. * linux-low.h (struct process_info): Doc improvement. * mem-break.c (delete_all_breakpoints): New. * mem-break.h (delete_all_breakpoints): New prototype. * thread-db.c (find_first_thread): New. (thread_db_create_event): Call it instead of thread_db_find_new_threads. Clean up unused variables. (maybe_attach_thread): Remove first thread handling. (thread_db_find_new_threads): Use find_first_thread. (thread_db_get_tls_address): Likewise.
* * linux-thread-db.c (thread_db_attach): Delete.Daniel Jacobowitz2007-06-272-0/+37
| | | | | | | | | | | | | | | | | | | | | (thread_db_detach): Typo fix. Call target_mourn_inferior instead of fixing up proc_handle. (have_threads_callback, have_threads): New functions. (thread_db_wait): Remove dead proc_handle.pid check. Only translate PTIDs if we have registered threads. Check for new threads if we have none. (thread_db_create_inferior, thread_db_post_startup_inferior): Delete. (find_new_threads_callback): Only enable event reporting if TID == 0. (same_ptid_callback): New. (thread_db_get_thread_local_address): Check for new threads. (init_thread_db_ops): Don't set to_attach, to_create_inferior, or to_post_startup_inferior. * thread-db.c (thread_db_find_new_threads): Add prototype. (thread_db_create_event): Check for the main thread before adding a new thread. (maybe_attach_thread): Only enable event reporting if TID == 0. (thread_db_get_tls_address): Check for new threads.
* * linux-low.c (linux_create_inferior): Try execv before execvp.Daniel Jacobowitz2007-06-203-2/+11
| | | | * spu-low.c (spu_create_inferior): Likewise.
* 2007-06-13 Mike Frysinger <vapier@gentoo.org>Daniel Jacobowitz2007-06-133-2/+7
| | | | | * linux-low.c (linux_create_inferior): Change execv to execvp. * spu-low.c (spu_create_inferior): Likewies.
* * features/Makefile: Generate regformats for mips-linux andDaniel Jacobowitz2007-06-134-28/+50
| | | | | | | | | | | | | | | | | | | | | | | mips64-linux. * features/sort-regs.xsl: Correct typo. * regformats/reg-mips.dat, regformats/reg-mips64.dat: Delete. * regformats/mips-linux.dat, regformats/mips64-linux.dat: New generated files. * Makefile.in (clean): Clean new files instead of deleted ones. (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete. (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New rules. * configure.srv: Specify XML files and new regformats for MIPS and MIPS64 GNU/Linux. * linux-mips-low.c (mips_num_regs): Set to only used registers. (mips_regmap): Do not fetch $0. Remove unused registers. Add an entry for the restart register. (mips_cannot_fetch_register, mips_cannot_store_register) (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update register names to match the XML descriptions. (mips_fill_gregset, mips_store_gregset): Likewise. Handle the restart register instead of $0.
* ChangeLog:Ulrich Weigand2007-06-126-4/+118
| | | | | | | | | | | | | | | | | | | | | | | * remote.c (remote_write_qxfer): New function. (remote_xfer_partial): Add handling for TARGET_OBJECT_SPU. (remote_read_qxfer): Do not cache empty objects. (_initialize_remote): Add PACKET_qXfer_spu_read and PACKET_qXfer_spu_write. doc/ChangeLog: * gdb.texinfo (General Query Packets): Document qXfer:spu:read and qXfer:spu:write packets and mention them under qSupported. gdbserver/ChangeLog: * remote-utils.c (decode_xfer_write): New function. * server.h (decode_xfer_write): Add prototype. * server.c (handle_query): Add PACKET_LEN argument. Support qXfer:spu:read and qXfer:spu:write packets. (main): Pass packet_len to handle_query. * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu. * target.h (target_ops): Add qxfer_spu.
* ChangeLog:Ulrich Weigand2007-06-122-1/+6
| | | | | | | | | | * spu-linux-nat.c (spu_proc_xfer_spu): Do not return failure when accessing non-seekable spufs files. gdbserver/ChangeLog: * spu-low.c (spu_proc_xfer_spu): Do not return failure when accessing non-seekable spufs files.
* Fix typo.Pedro Alves2007-05-161-2/+1
|
* 2007-05-16 Markus Deuling <deuling@de.ibm.com>Ulrich Weigand2007-05-162-0/+13
| | | | * server.c (handle_query): Add reply for qC packet.
* * server.h (check_remote_input_interrupt_request): New function.Pedro Alves2007-05-104-11/+86
| | | | | | | | | | | | | | | | | * remote_utils.c (INVALID_DESCRIPTOR): New define. (remote_desc): Initialize with INVALID_DESCRIPTOR. (input_interrupt): Expose on USE_WIN32API too. Fix whitespace. (check_remote_input_interrupt_request): New function. * server.h (check_remote_input_interrupt_request): Declare. * win32-low.(winapi_DebugBreakProcess, winapi_GenerateConsoleCtrlEvent): New typedefs. (get_child_debug_event): Lower Win32 debug event polling from 1 sec to 250 ms. (win32_wait): Check for remote interrupt request with check_remote_input_interrupt_request. (win32_request_interrupt): New function. (win32_target_op): Set request_interrupt to win32_request_interrupt.
* * win32-low.c (debug_registers_changed,Pedro Alves2007-05-105-227/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug_registers_used, CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS, CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete. (thread_rec): Get context using the low target. (child_add_thread): Call thread_added on the low target, which does the same thing. (regptr): Delete. (do_initial_child_stuff): Remove debug registers references. Set context using the low target. Resume threads after setting the contexts. (child_continue): Remove dead variable. Remove debug registers references. (child_fetch_inferior_registers): Go through the low target. (do_child_store_inferior_registers): Remove. (child_store_inferior_registers): Go through the low target. (win32_resume): Remove debug registers references. Set context using the low target. (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 goto loop. Always return after waiting for debug event. (win32_wait): Convert to switch statement. Handle spurious events. * win32-i386-low.c (debug_registers_changed, debug_registers_used): New. (initial_stuff): Rename to ... (i386_initial_stuff): ... this. Clear debug registers state variables. (store_debug_registers): Delete. (i386_get_thread_context): New. (load_debug_registers): Delete. (i386_set_thread_context): New. (i386_thread_added): New. (single_step): Rename to ... (i386_single_step): ... this. (do_fetch_inferior_registers): Rename to ... (i386_fetch_inferior_register): ... this. (i386_store_inferior_register): New. (the_low_target): Adapt to new interface. * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define. (arm_get_thread_context): New. (arm_set_thread_context): New. (regptr): New. (do_fetch_inferior_registers): Rename to ... (arm_fetch_inferior_register): ... this. (arm_store_inferior_register): New. (arm_wince_breakpoint): Reimplement as unsigned long. (arm_wince_breakpoint_len): Define. (the_low_target): Adapt to new interface. * win32-low.h (target_ops): Remove regmap, store_debug_registers and load_debug_registers. Add get_thread_context, set_thread_context, thread_added and store_inferior_register. Rename fetch_inferior_registers to fetch_inferior_register. (regptr): Remove declaration.
* * linux-low.c (linux_detach): Change return type to int. Return 0.Pedro Alves2007-05-103-2/+9
| | | | * spu-low.c (spu_detach): Likewise.
* * target.h (target_ops): Change return type of detach to int.Pedro Alves2007-05-106-29/+120
| | | | | | | | | | | | | | | | | Add join. (join_inferior): New. * server.c (main): Don't skip detach support on mingw32. If the inferior doesn't support detaching return error. Call join_inferior instead of using waitpid. * linux-low.c (linux_join): New. (linux_target_op): Add linux_join. * spu-low.c (spu_join): New. (spu_target_ops): Add spu_join. * win32-low.c (win32_detach): Adapt to new interface. Reopen current_process_handle before detaching. Issue a child resume before detaching. (win32_join): New. (win32_target_op): Add win32_join.
* * win32-low.c (win32-attach): Fix return value.Pedro Alves2007-05-103-18/+21
| | | | * target.h (target_ops): Describe ATTACH return values.
* * win32-low.c (GETPROCADDRESS): Define.Pedro Alves2007-05-102-26/+38
| | | | | | | | (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer. (winapi_DebugSetProcessKillOnExit): Likewise. (win32_create_inferior): Force usage of ansi CreateProcessA. (win32_attach): Use GETPROCADDRESS. (win32_detach): Likewise.
* * win32-low.c (win32_wait): Don't use WSTOPSIG.Pedro Alves2007-05-102-6/+5
|
* * win32-low.c: Commit leftover changes from 2007-03-29.Pedro Alves2007-03-302-160/+226
|
* * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bitDaniel Jacobowitz2007-03-302-21/+32
| | | | | | | fields short instead of int. Add explicit padding. (i387_cache_to_fsave): Remove unnecessary casts. (i387_fsave_to_cache): Doc fix. (i387_cache_to_fxsave): Remove unnecessary casts and masking.
* * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.Daniel Jacobowitz2007-03-302-1/+7
| | | | (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
* * configure.srv (arm*-*-mingw32ce*): Move near the otherPedro Alves2007-03-292-6/+11
| | | | arm targets.
* Ooops, fix up ChangeLog.Pedro Alves2007-03-291-2/+2
|
* gdb/Pedro Alves2007-03-2918-23/+848
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm-wince-tdep.c: New. * config/arm/wince.mt (DEPRECATED_TM_FILE): Use tm-arm.h. (MT_CFLAGS): Delete. (TM_CLIBS): Delete. (TDEPFILES): Add arm-wince-tdep.o, corelow.o, solib.o, solib-legacy.o, solib-svr4.o, and remove wince.o. * configure.tgt (arm*-*-mingw32ce*): Add. * signals/signals.c [HAVE_SIGNAL_H]: Check. (do_target_signal_to_host): Silence 'not used' warning. * config/arm/tm-wince.h: Remove. gdb/gdbserver/ * gdbserver/configure.ac: Add errno checking. (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h, sys/file.h and malloc.h. (AC_CHECK_DECLS): Add perror. (srv_mingwce): Handle. * gdbserver/configure.srv (i[34567]86-*-cygwin*): Add win32-i386-low.o to srv_tgtobj. (i[34567]86-*-mingw*): Likewise. (arm*-*-mingw32ce*): Add case. * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H, HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check. [__MINGW32CE__] (strerror): New function. [__MINGW32CE__] (errno): Define to GetLastError. [__MINGW32CE__] (COUNTOF): New macro. (remote_open): Remove extra close call. * mem-break.c (delete_breakpoint_at): New function. * mem-break.h (delete_breakpoint_at): Declare. * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H, HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check. [USE_WIN32API] (read, write): Add char* casts. * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check. * server.h: Include wincecompat.h on Windows CE. [HAVE_ERRNO_H]: Check. (perror): Declare if not declared. * utils.c: Add stdlib.h, errno.h and malloc.h includes. (perror_with_name): Remove errno declaration. * wincecompat.h: New. * wincecompat.c: New. * win32-low.h: New. * win32-arm-low.c: New. * win32-i386-low.c: New. (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h. (OUTMSG2): Make it safe. (_T): New macro. (COUNTOF): New macro. (NUM_REGS): Get it from the low target. (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0. (thread_rec): Let low target handle debug registers. (child_add_thread): Likewise. (child_init_thread_list): Likewise. (continue_one_thread): Likewise. (regptr): New. (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): Go through the low target. (do_child_store_inferior_registers): Use regptr. (strwinerror): New function. (win32_create_inferior): Handle Windows CE. Use strwinerror instead of strerror on Windows error codes. Add program to the error output. Don't close the main thread handle on Windows CE. (win32_attach): Use coredll.dll on Windows CE. (win32_kill): Close current process and current thread handles. (win32_detach): Use coredll.dll on Windows CE. (win32_resume): Let low target handle debug registers, and step request. (handle_exception): Add/Remove initial breakpoint. Avoid non-existant WSTOPSIG on Windows CE. (win32_read_inferior_memory): Cast to remove warning. (win32_arch_string): Go through the low target. (initialize_low): Call set_breakpoint_data with the low target's breakpoint. * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM, FOP_REGNUM, mappings): Move to ... * win32-i386-low.c: ... here. * win32-low.c (win32_thread_info): Move to ... * win32-low.h: ... here. * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c, win32-arm-low.c and wincecompat.c. (all:): Add $EXEEXT. (install-only:): Likewise. (gdbserver:): Likewise. (gdbreplay:): Likewise. * config.in: Regenerate. * configure: Regenerate.
* * win32-low.c: Rename typedef thread_info toPedro Alves2007-03-282-18/+23
| | | | win32_thread_info throughout.
* * win32-i386-low.c: Rename to ...Pedro Alves2007-03-284-3/+10
| | | | | | * win32-low.c: ... this. * configure.srv: Replace win32-i386-low.o with win32-low.o. * Makefile.in: Likewise.
* * remote-utils.c (monitor_output): Constify msg parameter.Pedro Alves2007-03-274-2/+54
| | | | | | | | * server.h (monitor_output): Likewise. * win32-i386-low.c (handle_output_debug_string): New. (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using handle_output_debug_string. (get_child_debug_event): Likewise.
* 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>Daniel Jacobowitz2007-03-272-1/+5
| | | | * server.c (main): Correct strtoul check.
* 2007-03-27 Jon Ringle <jon@ringle.org>Daniel Jacobowitz2007-03-272-3/+13
| | | | * linux-low.c: Check __ARCH_HAS_MMU__ also.
* Add "make pdf" and "make install-pdf", from Brooks MosesDaniel Jacobowitz2007-03-272-1/+6
| | | | <brooks.moses@codesourcery.com>.
* * terminal.h: Check HAVE_SGTTY_H.Daniel Jacobowitz2007-02-272-2/+8
|
* from Mat Hostetter <mat@lcs.mit.edu>Daniel Jacobowitz2007-02-272-0/+15
| | | | * remote-utils.c (remote_open): Print out the assigned port number.
* * gdb.texinfo (Monitor commands for gdbserver): New subsection.Daniel Jacobowitz2007-02-267-7/+90
| | | | | | | | | | | | | * remote-utils.c (monitor_output): New function. * server.c (debug_threads): Define here. (monitor_show_help): New function. (handle_query): Handle qRcmd. (main): Do not handle 'd' packet. * server.h (debug_threads, remote_debug, monitor_output): Declare. * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions of debug_threads. * gdb.server/server-mon.exp: New test.
* * Makefile.in (EXEEXT): New.Pedro Alves2007-02-252-1/+7
| | | | (clean): Use $(EXEEXT).
* * target.h (target_ops): Rename send_signal to request_interrupt,Pedro Alves2007-02-255-12/+26
| | | | | | | | | | | and remove enum target_signal parameter. * linux-low.c (linux_request_interrupt): Rename from linux_send_signal, and always send SIGINT. * spu-low.c (spu_request_interrupt): Rename from spu_send_signal, and always send SIGINT. * remote-utils.c (putpkt_binary): Call request_interrupt, instead of send_signal. (input_interrupt): Likewise.
* * server.c (get_features_xml): Check if target implementedPedro Alves2007-02-253-3/+26
| | | | | | arch_string. * win32-i386-low.c (win32_arch_string): New. (win32_target_ops): Add win32_arch_string as arch_string member.
* * spu-low.c (spu_arch_string): New.Ulrich Weigand2007-02-222-0/+18
| | | | (spu_target_ops): Add spu_arch_string.
* * remote-utils.c: Remove HAVE_TERMINAL_H check.Daniel Jacobowitz2007-02-165-8/+8
| | | | | * configure.ac: Do not check for terminal.h. * configure, config.in: Regenerated.