Commit Graph

324 Commits

Author SHA1 Message Date
Daniel Jacobowitz 255e7678a9 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
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.
2007-07-17 12:51:41 +00:00
Daniel Jacobowitz 0d37add962 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
* linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2007-07-12 19:59:00 +00:00
Pedro Alves 45e2715e39 * win32-low.c (handle_output_debug_string): Ignore event if not
waiting.
2007-07-08 19:37:46 +00:00
Pedro Alves c5674cf19d * win32-arm-low.c (arm_wince_breakpoint): Fix typo. 2007-07-08 00:25:30 +00:00
Daniel Jacobowitz 2bbe3cc107 2007-07-03 Paul Gilliam <pgilliam@us.ibm.com>
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.
2007-07-03 15:58:42 +00:00
Daniel Jacobowitz ae13219ef8 * inferiors.c (change_inferior_id): Add comment.
* 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.
2007-07-02 15:35:36 +00:00
Daniel Jacobowitz 4105de343e * linux-thread-db.c (thread_db_attach): Delete.
(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.
2007-06-27 11:52:02 +00:00
Daniel Jacobowitz 2b876972d0 * linux-low.c (linux_create_inferior): Try execv before execvp.
* spu-low.c (spu_create_inferior): Likewise.
2007-06-20 18:54:21 +00:00
Daniel Jacobowitz 7a245884a8 2007-06-13 Mike Frysinger <vapier@gentoo.org>
* linux-low.c (linux_create_inferior): Change execv to execvp.
	* spu-low.c (spu_create_inferior): Likewies.
2007-06-13 21:03:38 +00:00
Daniel Jacobowitz 117ce54362 * features/Makefile: Generate regformats for mips-linux and
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.
2007-06-13 18:50:38 +00:00
Ulrich Weigand 0e7f50da78 ChangeLog:
* 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.
2007-06-12 14:38:32 +00:00
Ulrich Weigand 374c1d382b ChangeLog:
* 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.
2007-06-12 14:31:26 +00:00
Pedro Alves 3ecf0694a8 Fix typo. 2007-05-16 20:17:01 +00:00
Ulrich Weigand bb63802a4f 2007-05-16 Markus Deuling <deuling@de.ibm.com>
* server.c (handle_query): Add reply for qC packet.
2007-05-16 15:26:35 +00:00
Pedro Alves 7390519ea0 * server.h (check_remote_input_interrupt_request): New function.
* 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.
2007-05-10 22:04:50 +00:00
Pedro Alves 34b3492108 * win32-low.c (debug_registers_changed,
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.
2007-05-10 21:48:56 +00:00
Pedro Alves dd6953e1f3 * linux-low.c (linux_detach): Change return type to int. Return 0.
* spu-low.c (spu_detach): Likewise.
2007-05-10 21:33:31 +00:00
Pedro Alves 444d61395b * target.h (target_ops): Change return type of detach to int.
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.
2007-05-10 21:05:15 +00:00
Pedro Alves 1d5315fee9 * win32-low.c (win32-attach): Fix return value.
* target.h (target_ops): Describe ATTACH return values.
2007-05-10 20:48:41 +00:00
Pedro Alves bf91483160 * win32-low.c (GETPROCADDRESS): Define.
(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.
2007-05-10 20:39:18 +00:00
Pedro Alves f72f3e600b * win32-low.c (win32_wait): Don't use WSTOPSIG. 2007-05-10 20:25:01 +00:00
Pedro Alves ed50f18f18 * win32-low.c: Commit leftover changes from 2007-03-29. 2007-03-30 20:28:24 +00:00
Daniel Jacobowitz 0c2ead7e16 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
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.
2007-03-30 17:13:02 +00:00
Daniel Jacobowitz 73725ff3e1 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
(i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2007-03-30 15:29:46 +00:00
Pedro Alves d99f33d88b * configure.srv (arm*-*-mingw32ce*): Move near the other
arm targets.
2007-03-29 01:46:20 +00:00
Pedro Alves 2482afc6aa Ooops, fix up ChangeLog. 2007-03-29 01:10:37 +00:00
Pedro Alves 68070c10c7 gdb/
* 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.
2007-03-29 01:06:48 +00:00
Pedro Alves 41093d8184 * win32-low.c: Rename typedef thread_info to
win32_thread_info throughout.
2007-03-28 22:12:31 +00:00
Pedro Alves 544afa546f * win32-i386-low.c: Rename to ...
* win32-low.c: ... this.
	* configure.srv: Replace win32-i386-low.o with win32-low.o.
	* Makefile.in: Likewise.
2007-03-28 22:00:15 +00:00
Pedro Alves bce7165daa * remote-utils.c (monitor_output): Constify msg parameter.
* 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 22:46:08 +00:00
Daniel Jacobowitz 506c7aa0d5 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
* server.c (main): Correct strtoul check.
2007-03-27 19:10:16 +00:00
Daniel Jacobowitz 42c81e2acb 2007-03-27 Jon Ringle <jon@ringle.org>
* linux-low.c: Check __ARCH_HAS_MMU__ also.
2007-03-27 18:32:01 +00:00
Daniel Jacobowitz 9453113a8d Add "make pdf" and "make install-pdf", from Brooks Moses
<brooks.moses@codesourcery.com>.
2007-03-27 18:09:36 +00:00
Daniel Jacobowitz 64a6910722 * terminal.h: Check HAVE_SGTTY_H. 2007-02-27 17:23:34 +00:00
Daniel Jacobowitz 6f8486daac from Mat Hostetter <mat@lcs.mit.edu>
* remote-utils.c (remote_open): Print out the assigned port number.
2007-02-27 17:21:35 +00:00
Daniel Jacobowitz c74d0ad827 * gdb.texinfo (Monitor commands for gdbserver): New subsection.
* 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.
2007-02-26 20:10:18 +00:00
Pedro Alves de7c3b4ad8 * Makefile.in (EXEEXT): New.
(clean): Use $(EXEEXT).
2007-02-25 19:44:29 +00:00
Pedro Alves ef57601be4 * target.h (target_ops): Rename send_signal to request_interrupt,
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.
2007-02-25 17:59:43 +00:00
Pedro Alves 820f2bda8e * server.c (get_features_xml): Check if target implemented
arch_string.
	* win32-i386-low.c (win32_arch_string): New.
	(win32_target_ops): Add win32_arch_string as arch_string member.
2007-02-25 17:40:10 +00:00
Ulrich Weigand ab39bf2466 * spu-low.c (spu_arch_string): New.
(spu_target_ops): Add spu_arch_string.
2007-02-22 17:41:37 +00:00
Daniel Jacobowitz 61ff6e04e4 * remote-utils.c: Remove HAVE_TERMINAL_H check.
* configure.ac: Do not check for terminal.h.
	* configure, config.in: Regenerated.
2007-02-16 20:01:14 +00:00
Daniel Jacobowitz fb1e4ffce3 * features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
	features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
	* regformats/arm-with-iwmmxt.dat: Generate.
	* NEWS: Mention iWMMXt.

	* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.

	* Makefile.in (OBS): Add $(XML_BUILTIN).
	(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
	(clean): Update.
	(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
	(arm-with-iwmmxt.c): New.
	* config.in, configure: Regenerate.
	* configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
	srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
	* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
	(arm*-*-linux*): Add iWMMXt and regset support.
	* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
	(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
	(arm_store_wmmxregset, target_regsets): New.
	* server.c (get_features_xml): Take annex argument.  Check builtin
	XML documents.
	(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
Daniel Jacobowitz 0f48aa010e * remote-utils.c [USE_WIN32API] (read, write): Define.
(putpkt_binary, input_interrupt, readchar, getpkt): Use read and
	write.
2007-01-29 13:22:09 +00:00
Daniel Jacobowitz 23181151a2 XML feature description support.
* NEWS: Mention target descriptions, "set tdesc filename",
	"unset tdesc filename", "show tdesc filename", and
	qXfer:features:read.
	* arch-utils.c (choose_architecture_for_target): New function.
	(gdbarch_info_fill): Call it.
	* target-descriptions.c (struct property): Make members non-const.
	(struct target_desc): Add arch member.
	(target_description_filename): New variable.
	(target_find_description): Try via XML first.
	(tdesc_architecture): New.
	(free_target_description, make_cleanup_free_target_description): New.
	(set_tdesc_property): Call xstrdup.
	(set_tdesc_architecture, tdesc_set_cmdlist, tdesc_show_cmdlist)
	(tdesc_unset_cmdlist, unset_tdesc_cmd, unset_tdesc_filename_cmd)
	(set_tdesc_cmd, show_tdesc_cmd, set_tdesc_filename_cmd)
	(show_tdesc_filename_cmd, _initialize_target_descriptions): New.
	* target-descriptions.h (tdesc_architecture)
	(make_cleanup_free_target_description, set_tdesc_architecture): New
	prototypes.
	* Makefile.in (SFILES): Add xml-tdesc.c.
	(COMMON_OBS): Add xml-tdesc.o.
	(target-descriptions.o): Update.
	(xml-tdesc.o): New rule.
	* xml-tdesc.c, xml-tdesc.h: New files.
	* remote.c (PACKET_qXfer_features): New enum.
	(remote_protocol_features): Add qXfer:features:read.
	(remote_xfer_partial): Handle TARGET_OBJECT_AVAILABLE_FEATURES.
	(_initialize_remote): Register qXfer:features:read.
	* target.h (enum target_object): Add TARGET_OBJECT_AVAILABLE_FEATURES.
	* features/gdb-target.dtd: New file.

	* linux-i386-low.c (the_low_target): Set arch_string.
	* linux-x86-64-low.c (the_low_target): Likewise.
	* linux-low.c (linux_arch_string): New.
	(linux_target_ops): Add it.
	* linux-low.h (struct linux_target_ops): Add arch_string.
	* server.c (write_qxfer_response): Use const void * for DATA.
	(get_features_xml): New.
	(handle_query): Handle qXfer:features:read.  Report it for qSupported.
	* target.h (struct target_ops): Add arch_string method.

	* gdb.texinfo (Target Descriptions): New section.
	(General Query Packets): Add QPassSignals anchor.  Mention
	qXfer:features:read under qSupported.  Expand mentions of
	qXfer:memory-map:read and QPassSignals.  Document
	qXfer:features:read.
2007-01-09 22:55:10 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 9d6063994f * linux-low.c (linux_kill): Handle being called with no threads.
* win32-i386-low.c (win32_kill): Likewise.
	(get_child_debug_event): Clear current_process_handle.
2007-01-03 17:57:16 +00:00
Daniel Jacobowitz 8264bb58d6 * remote-utils.c (remote_open): Check the type of specified
serial port devices before opening them.
	* server.c (main): Kill the inferior if an error occurs during
	the first remote_open.
2006-12-30 15:44:51 +00:00
Daniel Jacobowitz a5e13d24f0 2006-12-05 Markus Deuling <deuling@de.ibm.com>
* README: Update supported targets.
2006-12-05 21:18:38 +00:00
Daniel Jacobowitz 186947f7ca gdb/gdbserver/
* Makefile.in (clean): Remove reg-mips64.c.
	(reg-mips64.c, reg-mips64.o): New rules.
	* configure.srv: Handle mips64.  Include regset support for mips.
	* linux-mips-low.c (union mips_register): New.
	(mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
	(mips_breakpoint, mips_breakpoint_at): Use int.
	(mips_collect_register, mips_supply_register)
	(mips_collect_register_32bit, mips_supply_register_32bit)
	(mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
	(mips_store_fpregset, target_regsets): New.
	* thread-db.c (thread_db_get_tls_address): Use uintptr_t.
gdb/
	* regformats/reg-mips64.dat: New file.
2006-11-28 22:21:23 +00:00
Ulrich Weigand a13e2c95aa ChangeLog:
* configure.tgt: Enable gdbserver for SPU target.
	* configure.ac: Build gdbserver when gdb_native is yes.
	* configure: Regenerate.
	* regformats/reg-spu.dat: New file.

gdbserver/ChangeLog:

	* configure.srv: Add target "spu*-*-*".
	* Makefile.in (clean): Remove reg-spu.c.
	(reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
	* spu-low.c: New file.
2006-11-22 17:34:15 +00:00
Daniel Jacobowitz cb7283db10 * configure.ac: Correct td_thr_tls_get_addr test.
* configure: Regenerated.
2006-11-16 22:04:09 +00:00
Daniel Jacobowitz 89be209149 gdb/
* remote.c (PACKET_QPassSignals): New.
	(last_pass_packet, remote_pass_signals): New.
	(remote_protocol_features): Add QPassSignals.
	(remote_query_supported): Correct an infinite loop.
	(remote_open_1): Reset last_pass_packet.
	(remote_resume): Call remote_pass_signals.
	(_initialize_remote): Register "set remote pass-signals".
gdb/doc/
	* gdb.texinfo (Remote configuration): Mention
	"pass-signals-packet".
	(General Query Packets): Document QPassSignals.  Fix
	a typo.
gdb/gdbserver/
	* linux-low.c (linux_wait_for_event): Reformat.  Use the
	pass_signals array.
	* remote-utils.c (decode_address_to_semicolon): New.
	* server.c (pass_signals, handle_general_set): New.
	(handle_query): Mention QPassSignals for qSupported.
	(main): Call handle_general_set.
	* server.h (pass_signals, decode_address_to_semicolon): New.
2006-11-16 15:08:25 +00:00
Daniel Jacobowitz 000ef4f0ec * server.c (handle_query): Correct error handling for read_auxv. 2006-11-06 21:50:32 +00:00
Ulrich Weigand b7149293aa 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
* configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
        and srv_linux_thread_db to yes.
        * linux-s390-low.c (s390_fill_gregset): New function.
        (target_regsets): Define data structure.
2006-10-20 00:34:35 +00:00
Daniel Jacobowitz dae5f5cf4b * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
* configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
	* config.in, configure: Regenerated.
	* inferiors.c (gdb_id_to_thread): New function.
	(gdb_id_to_thread_id): Use it.
	* linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
	* linux-low.h (struct process_info): Add th member.
	(thread_db_get_tls_address): New prototype.
	* remote-utils.c (decode_address): Make non-static.
	* server.c (handle_query): Handle qGetTLSAddr.
	* server.h (gdb_id_to_thread, decode_address): New prototypes.
	* target.h (struct target_ops): Add get_tls_address.
	* thread-db.c (maybe_attach_thread): Save the thread handle.
	(thread_db_get_tls_address): New.
2006-10-17 16:02:27 +00:00
Daniel Jacobowitz 32ca6d6157 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
(linux_resume_one_process): Take a siginfo_t *.  Update all
	callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
	(struct pending_signals): Add a siginfo_t.
	(linux_wait_for_process): Always set last_status.
	(linux_wait_for_event): Use PTRACE_GETSIGINFO.
	(linux_queue_one_thread): Use PTRACE_GETSIGINFO.
	* linux-low.h (struct process_info): Add last_status.
2006-09-28 22:46:29 +00:00
Daniel Jacobowitz 5ffff7c1d1 * remote-utils.c (try_rle): New function.
(putpkt_binary): Use it.
2006-09-21 16:09:54 +00:00
Daniel Jacobowitz 8695c747d8 gdb/
* Makefile.in (amd64_linux_tdep_h): New.
	(amd64-linux-nat.o, amd64-linux-tdep.o): Update.
	* amd64-linux-nat.c (amd64_linux_gregset64_reg_offset): Add
	ORIG_RAX.
	(_initialize_amd64_linux_nat): Set amd64_native_gregset64_num_regs.
	* amd64-linux-tdep.c (amd64_linux_register_name)
	(amd64_linux_register_type, amd64_linux_register_reggroup_p)
	(amd64_linux_write_pc): New.
	(amd64_linux_init_abi): Use them, and update num_regs.
	* amd64-linux-tdep.h: New file.
	* amd64-tdep.c (amd64_register_name, amd64_register_type): Make
	public.
	* amd64-tdep.h (amd64_register_name, amd64_register_type): New
	prototypes.

	* regformats/reg-x86-64-linux.dat: New file.
gdb/testsuite/
	* Makefile.in (clean): Clean reg-x86-64-linux.c.
	(reg-x86-64-linux.o, reg-x86-64-linux.c): New.
	* configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
	* linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
	(x86_64_fill_gregset, x86_64_store_gregset): Skip floating
	point registers.
2006-08-19 15:15:18 +00:00
Richard Sandiford 290fadea96 gdb/gdbserver/
* server.c (terminal_fd): New variable.
	(old_foreground_pgrp): Likewise.
	(restore_old_foreground_pgrp): New function.
	(start_inferior): Record the terminal file descriptor in terminal_fd
	and its original foreground group in old_foreground_pgrp.  Register
	restore_old_foreground_pgrp with atexit().
2006-08-08 16:03:29 +00:00
Daniel Jacobowitz 9f2e1e6389 * server.c (handle_query): Correct qPart to qXfer. 2006-07-27 00:06:12 +00:00
Daniel Jacobowitz b80864fbe5 gdb/
* configure.tgt: Build gdbserver for Cygwin and mingw32.
gdb/gdbserver/
	* configure.ac: Check for more headers which are missing on
	Windows.  Automatically supply -lwsock32 and USE_WIN32API.
	* configure.srv: Add Cygwin and mingw32.
	* remote-utils.c: Don't include headers unconditionally which
	are missing on mingw32.  Include <winsock.h> for mingw32.
	(remote_open): Adjust for mingw32 support.  Flush
	standard error after writing to it.
	(remote_close, putpkt_binary, input_interrupt, block_async_io)
	(unblock_async_io, enable_async_io, disable_async_io)
	(readchar, getpkt): Update for Winsock support.
	(prepare_resume_reply): Expect a protocol signal number.
	* server.c: Disable <sys/wait.h> on mingw32.
	(start_inferior): Adjust for mingw32 support.  Flush
	standard error after writing to it.
	(attach_inferior): Likewise.  Use protocol signal
	numbers.
	(main): Skip 'D' packet on mingw32.  Use protocol signal numbers
	and names.
	* win32-i386-low.c: New file.
	* Makefile.in (XM_CLIBS): Set.
	(gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
	(win32-i386-low.o): New dependency rule.
	* linux-low.c (linux_wait): Use target signal numbers.
	* target.h (struct target_ops): Doc fix.
	* server.h (target_signal_to_name): New prototype.
	* gdbreplay.c: Don't include headers unconditionally which
	are missing on mingw32.  Include <winsock.h> for mingw32.
	(remote_close, remote_open): Adjust for Winsock support.
	* configure, config.in: Regenerated.
2006-07-23 03:52:15 +00:00
Daniel Jacobowitz 0876f84a6a gdb/
* remote.c (PACKET_qXfer_auxv): New, renamed from PACKET_qPart_auxv.
	(remote_supported_packet): Remove #if 0.
	(remote_protocol_features): Add qPart:auxv:read.
	(remote_unescape_input): New function.
	(readchar): Don't mask off the high bit.
	(read_frame): Use fputstrn_filtered for packet data.
	(getpkt_sane): Return the number of bytes read or -1.  Use
	fputstrn_unfiltered.
	(remote_read_qxfer): New.
	(remote_xfer_partial): Use it for TARGET_OBJECT_AUXV.
	(_initialize_remote): Update packet registration.
	* defs.h (fputstrn_filtered): New prototype.
	* utils.c (fputstrn_filtered): New.
	* NEWS: Mention qXfer.
gdb/doc/
	* gdb.texinfo (OS Information): Update qPart reference to
	qXfer.
	(Remote configuration): Likewise.
	(Overview): Move @cindex to the start of a paragraph.  Talk
	about binary data encoding.
	(Packets): Refer to the overview for the details of the X
	packet encoding.
	(General Query Packets): Remove qPart description.  Add qXfer
	description.  Add an anchor to qSupported.  Correct feature
	table title.  Add a new feature for qXfer:auxv:read.
	(Interrupts): Add a missing parenthesis.
gdb/gdbserver/
	* server.c (decode_xfer_read, write_qxfer_response): New.
	(handle_query): Take a packet length argument.  Handle
	qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
	the qSupported response.
	(main): Update call to handle_query.
2006-07-12 18:50:18 +00:00
Daniel Jacobowitz 01f9e8fab8 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
(putpkt_binary): Renamed from putpkt and adjusted for binary
	data.
	(putpkt): New wrapper for putpkt_binary.
	(readchar): Don't mask off the high bit.
	(decode_X_packet): New function.
	* server.c (main): Call putpkt_binary if a handler sets the packet
	length.  Save the length of the incoming packet.  Handle 'X'.
	* server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2006-06-22 15:20:47 +00:00
Daniel Jacobowitz be2a5f717b gdb/
* NEWS: Mention qSupported.
	* remote.c (struct remote_state): Add explicit_packet_size.
	(get_remote_packet_size): Check explicit_packet_size.
	(get_memory_packet_size): Likewise.
	(PACKET_qSupported): New enum value.
	(struct protocol_feature, remote_supported_packet)
	(remote_packet_size, remote_protocol_features)
	(remote_query_supported): New.
	(remote_open_1): Reset explicit_packet_size.  Call
	remote_query_supported.
	(_initialize_remote): Register qSupported.
gdb/doc/
	* gdb.texinfo (Remote configuration): Document set / show
	remote supported-packets.
	(General Query Packets): Document qSupported packet.
gdb/gdbserver/
	* server.c (handle_query): Handle qSupported.
2006-06-21 13:57:21 +00:00
Daniel Jacobowitz ea025f5f61 * remote-utils.c (all_symbols_looked_up): New variable.
(look_up_one_symbol): Check it.
	* server.h (look_up_one_symbol): New declaration.
	* thread-db.c (thread_db_init): Set all_symbols_looked_up.
2006-05-30 19:05:33 +00:00
Daniel Jacobowitz 66f338c7b9 Typo fix. 2006-05-30 15:58:47 +00:00
Daniel Jacobowitz 9308fc88e7 gdb/
* Makefile.in (arm-linux-nat.o): Update dependencies.
	* arm-linux-nat.c: Include "gdb_proc_service.h".
	(PTRACE_GET_THREAD_AREA): Define.
	(ps_get_thread_area): New function.
gdb/gdbserver/
	* Makefile.in (linux-arm-low.o): Update dependencies.
	* linux-arm-low.c: Include "../gdb_proc_service.h".
	(PTRACE_GET_THREAD_AREA): Define.
	(ps_get_thread_area): New function.
2006-05-30 15:57:09 +00:00
Nathan Sidwell 52fb643739 * configure.srv (m68k*-*-uclinux*): New target.
* linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
	(linux_resume_one_process): Remove extraneous cast.
	(linux_read_offsets): New.
	(linux_target_op): Add linux_read_offsets on mmuless systems.
	* server.c (handle_query): Add qOffsets logic.
	* target.h (struct target_ops): Add read_offsets.
2006-05-09 15:21:19 +00:00
Daniel Jacobowitz 21b0f40c16 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
(PTRACE_GET_THREAD_AREA): Define.
	(ps_get_thread_area): New function.
	* Makefile.in (linux-i386-low.o, linux-mips-low.o)
	(linux-x86-64-low.o): Update.
2006-03-15 16:26:02 +00:00
Daniel Jacobowitz 0050a760a7 * configure.ac: Remove checks for prfpregset_t.
* gdb_proc_service.h: New file.
	* linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
	new "gdb_proc_service.h".
	* proc-service.c: Likewise.
	(ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
	(ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
	* Makefile.in (gdb_proc_service_h): Updated.
	* configure, config.in: Regenerated.
2006-03-15 16:13:29 +00:00
Daniel Jacobowitz b92a518e73 * remote-utils.c (prepare_resume_reply): Move declaration
of gdb_id_from_wait to the top of the block.
2006-03-03 14:48:55 +00:00
Daniel Jacobowitz 545587ee60 * linux-low.c (regsets_store_inferior_registers): Read the regset
from the target before filling it.
2006-02-15 14:36:32 +00:00
Daniel Jacobowitz 9db87ebd04 * server.c (attach_inferior): Return SIGTRAP for a successful
attach.
2006-02-08 20:26:44 +00:00
Daniel Jacobowitz dd24457ddf * Makefile.in (OBS): Add version.o.
(STAGESTUFF): Delete.
	(version.o): Add dependencies.
	(version.c): Replace rule.
	(clean): Remove version.c.
	* server.c (gdbserver_version): New.
	(gdbserver_usage): Use printf.
	(main): Handle --version and --help.
	* server.h (version, host_name): Add declarations.
2006-02-01 21:37:21 +00:00
Eli Zaretskii 6f0f660e7b * linux-arm-low.c:
* linux-cris-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.
2005-12-23 18:11:55 +00:00
Daniel Jacobowitz 9d1fb17785 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
(arm_breakpoint_at): Recognize both breakpoints.
	(the_low_target): Use the correct breakpoint instruction.
2005-11-13 18:04:03 +00:00
Daniel Jacobowitz 011a70c2ea * configure.srv (x86_64-*-linux*): Turn on thread_db support.
* linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
	(x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
	(the_low_target): Update.
2005-11-02 19:54:44 +00:00
Andreas Schwab 7fb85e4190 * regformats/reg-ia64.dat: Remove NAT registers.
gdbserver:
	* server.c (main): Allocate mem_buf with PBUFSIZ bytes.

	* linux-ia64-low.c (ia64_regmap): Remove NAT registers.
	(ia64_num_regs): Reduce to 462.
2005-10-25 11:11:08 +00:00
Daniel Jacobowitz 3db0444b44 * acinclude.m4: Correct quoting.
* aclocal.m4: Regenerated.

	Suggested by SZOKOVACS Robert <szo@ies.hu>:
	* thread-db.c (thread_db_err_str): Handle TD_VERSION.
	(thread_db_init): Call thread_db_err_str.
	* configure.ac: Check for TD_VERSION.
	* config.in, configure: Regenerated.
2005-09-17 23:14:37 +00:00
Daniel Jacobowitz bee0189a82 From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>:
gdb/
	* cli-out.c (cli_field_fmt, cli_message, out_field_fmt): Add
	ATTR_FORMAT or ATTRIBUTE_FPTR_PRINTF.
	* complaints.c (vcomplaint): Likewise.
	* defs.h (xvasprintf, xstrvprintf, verror, vfatal)
	(internal_verror, internal_vwarning, vwarning)
	(deprecated_query_hook, deprecated_warning_hook)
	(deprecated_readline_begin_hook): Likewise.
	* disasm.c (fprintf_disasm): Likewise.
	* exceptions.c (throw_it): Likewise.
	* exceptions.h (throw_verror, throw_vfatal): Likewise.
	* mi/mi-interp.c (mi_interp_query_hook): Likewise.
	* mi/mi-out.c (mi_field_fmt, mi_message): Likewise.
	* tui/tui-hooks.c (tui_query_hook): Likewise.
	* tui/tui-out.c (tui_field_fmt, tui_message, out_field_fmt):
	Likewise.
	* ui-out.c (default_field_fmt, default_message, uo_field_fmt)
	(uo_message): Likewise.
	* ui-out.h (ui_out_field_fmt, ui_out_message, field_fmt_ftype)
	(message_ftype): Likewise.
	* utils.c (vfprintf_maybe_filtered, internal_vproblem)
	(defaulted_query, printchar): Likewise.
gdb/gdbserver/
	* server.h (error, fatal, warning): Add ATTR_FORMAT.
2005-07-31 20:56:26 +00:00
Daniel Jacobowitz e9d25b9800 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
is not available.  Define HAVE_PTRACE_GETREGS if it is.
	* config.in, configure: Regenerated.
	* configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
	* linux-i386-low.c, linux-m68k-low.c: Update to use
	HAVE_PTRACE_GETREGS.
	* linux-low.c (regsets_fetch_inferior_registers)
	(regsets_store_inferior_registers): Only return 0 if we processed
	GENERAL_REGS.
	* linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
	* linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2005-07-13 15:21:02 +00:00
Daniel Jacobowitz a06660f799 * inferiors.c (struct thread_info): Add gdb_id.
(add_thread): Add gdb_id argument.
	(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
	* linux-low.c (linux_create_inferior, linux_attach_lwp): Update
	calls to add_thread.
	* remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
	* server.c (handle_query): Use thread_to_gdb_id.
	(handle_v_cont, main): Use gdb_id_to_thread_id.
	* server.h (add_thread): Update prototype.
	(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
	prototypes.
2005-07-13 15:02:49 +00:00
Daniel Jacobowitz 5a1f5858d4 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
left-padded registers.
	* linux-low.h (struct linux_target_ops): Add left_pad_xfer.
	* linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2005-07-13 14:48:58 +00:00
Steve Ellcey e122f1f5f1 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
* configure: Regenerate.
	* config.in: Regenerate.
	* server.h (NEED_DECLARATION_STRERROR):
	Replace with !HAVE_DECL_STRERROR.
2005-07-01 17:18:06 +00:00
Daniel Jacobowitz d592fa2f7f * linux-low.c (linux_wait, linux_send_signal): Don't test
an unsigned long variable for > 0 if it could be MAX_ULONG.
	* server.c (myresume): Likewise.
	* target.c (set_desired_inferior): Likewise.
2005-06-17 04:01:05 +00:00
Mark Kettenis ccbd49121b * configure.ac: Simplify and improve check for socklen_t.
* configure, config.in: Regenerate.
2005-06-14 21:36:29 +00:00
Daniel Jacobowitz f450004a28 * acconfig.h: Remove.
* configure.ac: Add a test for socklen_t.  Use three-argument
	AC_DEFINE throughout.
	* config.in: Regenerated using autoheader 2.59.
	* configure: Regenerated.

	* gdbreplay.c (socklen_t): Provide a default.
	(remote_open): Use socklen_t.
	* remote-utils.c (socklen_t): Provide a default.
	(remote_open): Use socklen_t.
	(convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
	unsigned char.

	* i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
	char for buffers.
	* linux-low.c (linux_read_memory, linux_write_memory)
	(linux_read_auxv): Likewise.
	* mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
	(check_mem_write): Likewise.
	* mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
	Likewise.
	* regcache.c (struct inferior_rgcache_data, registers_to_string)
	(registers_from_string, register_data): Likewise.
	* server.c (handle_query, main): Likewise.
	* server.h (convert_ascii_to_int, convert_int_to_ascii)
	(decode_M_packet): Likewise.
	* target.c (read_inferior_memory, write_inferior_memory): Likewise.
	* target.h (struct target_ops): Update read_memory, write_memory,
	and read_auxv.
	(read_inferior_memory, write_inferior_memory): Update.
	* linux-low.h (struct linux_target_ops): Change type of breakpoint
	to unsigned char *.
	* linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
	linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
	linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
	linux-s390-low.c, linux-sh-low.c: Update for changes in
	read_inferior_memory and the_low_target->breakpoint.
2005-06-13 01:59:22 +00:00
Daniel Jacobowitz eee84df140 gdb/
* configure.tgt (powerpc64-*-linux*): Enable gdbserver.
	* regformats/reg-ppc64.dat: New file.
gdbserver/
	* Makefile.in (SFILES): Add linux-ppc64-low.c.
	(linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
	* configure.srv: Add powerpc64-*-linux*.
	* linux-ppc64-low.c: New file.
2005-05-28 22:09:04 +00:00
Orjan Friberg 45b134e593 2005-05-23 Orjan Friberg <orjanf@axis.com>
* linux-cris-low.c: New file with support for CRIS.
	* 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,
	reg-crisv32.o, and reg-crisv32.c to make rules.
	* configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
	recognized targets.
2005-05-23 11:20:07 +00:00
Ulrich Weigand 48d93c7500 * linux-low.c (fetch_register): Ensure buffer size is a multiple
of sizeof (PTRACE_XFER_TYPE).
	(usr_store_inferior_registers): Likewise.  Zero out excess bytes.
2005-05-16 10:24:37 +00:00
Orjan Friberg e013ee27c9 2005-05-12 Orjan Friberg <orjanf@axis.com>
* 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.
	* linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
	(linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
	to linux_target_ops.
	* remote-utils.c (prepare_resume_reply): Add watchpoint information to
	reply packet.
	* server.c (main): Recognize 'Z' and 'z' packets.
2005-05-12 12:14:23 +00:00
Ulrich Weigand b0ded00b3f * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
(s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
	(the_low_target): Add new members.
2005-05-10 13:48:59 +00:00
Daniel Jacobowitz 8643e2ad06 * proc-service.c (ps_lgetregs): Search all_processes instead of
all_threads.
2005-05-04 19:10:32 +00:00
Daniel Jacobowitz fc620387c9 * server.c (start_inferior): Change return type to int.
(attach_inferior): Change sigptr to int *.
	(handle_v_cont, handle_v_requests): Change signal to int *.
	(main): Change signal to int.
2005-05-04 18:51:38 +00:00
Kazuhiro Inaoka 7cfbc4a0f8 2005-04-15 Ke Sakamoto <sakamoto.kei@renesas.com>
* Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
	* configure.srv: Add m32r*-*-linux*.
	* linux-m32r-low.c: New file.
2005-04-15 00:24:51 +00:00
Daniel Jacobowitz e0e76420c3 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly. 2005-03-04 18:16:25 +00:00
Daniel Jacobowitz a1928bada5 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
Take unsigned long arguments for PIDs.
	* linux-low.c (add_process, linux_attach_lwp, linux_attach)
	(linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
	(wait_for_sigstop, linux_resume_one_process)
	(regsets_fetch_inferior_registers, linux_send_signal)
	(linux_read_auxv): Likewise.  Update the types of variables holding
	PIDs.  Update format string specifiers.
	* linux-low.h (struct process_info, linux_attach_lwp): Likewise.
	* remote-utils.c (prepare_resume_reply): Likewise.
	* server.c (cont_thread, general_thread, step_thread)
	(thread_from_wait, old_thread_from_wait, signal_pid): Change type to
	unsigned long.
	(handle_query): Update format specifiers.
	(handle_v_cont, main): Use strtoul for thread IDs.
	* server.h (struct inferior_list_entry): Use unsigned long for ID.
	(add_thread, find_inferior_id, change_inferior_id, cont_thread)
	(general_thread, step_thread, thread_from_wait)
	(old_thread_from_wait): Update.
	* target.h (struct thread_resume): Use unsigned long for THREAD.
	(struct target_ops): Use unsigned long for arguments to attach and
	thread_alive.
2005-03-03 16:56:53 +00:00
Daniel Jacobowitz dcdb98d29d * acinclude.m4: Include bfd/bfd.m4 directly.
* configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
	<agriffis@toolchain.org>.
	* aclocal.m4, configure: Regenerated.
2005-02-24 20:26:32 +00:00
Andrew Cagney bec39cab00 Index: ChangeLog
2005-01-07  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Rename configure.in, require autoconf 2.59.
	* configure: Re-generate.

Index: doc/ChangeLog
2005-01-07  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Rename configure.in, require autoconf 2.59.
	* configure: Re-generate.

Index: gdbserver/ChangeLog
2005-01-07  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Rename configure.in, require autoconf 2.59.
	* configure: Re-generate.

Index: testsuite/ChangeLog
2005-01-07  Andrew Cagney  <cagney@gnu.org>

	* configure.ac: Rename configure.in, require autoconf 2.59.
	* configure: Re-generate.
	* gdb.stabs/configure.ac: Rename configure.in, require autoconf 2.59.
	* gdb.stabs/configure: Re-generate.
	* gdb.hp/configure.ac: Rename configure.in, require autoconf 2.59.
	* gdb.hp/configure: Re-generate.
	* gdb.hp/gdb.objdbg/configure.ac: Rename configure.in, require
	autoconf 2.59.
	* gdb.hp/gdb.objdbg/configure: Re-generate.
	* gdb.hp/gdb.defects/configure.ac: Rename configure.in, require
	autoconf 2.59.
	* gdb.hp/gdb.defects/configure: Re-generate.
	* gdb.hp/gdb.compat/configure.ac: Rename configure.in, require
	autoconf 2.59.
	* gdb.hp/gdb.compat/configure: Re-generate.
	* gdb.hp/gdb.base-hp/configure.ac: Rename configure.in, require
	autoconf 2.59.
	* gdb.hp/gdb.base-hp/configure: Re-generate.
	* gdb.hp/gdb.aCC/configure.ac: Rename configure.in, require
	autoconf 2.59.
	* gdb.hp/gdb.aCC/configure: Re-generate.
2005-01-07 21:53:26 +00:00
Daniel Jacobowitz 434c4c7751 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
LIBS when finished.
	* aclocal.m4: Regenerated.
	* configure: Regenerated.
2004-12-08 15:50:29 +00:00