* 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.
(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.
* 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().
* 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.
* 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.
(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.
* 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.
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.
* 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.
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.