From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16489 invoked by alias); 9 Apr 2002 21:17:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16475 invoked from network); 9 Apr 2002 21:17:24 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 9 Apr 2002 21:17:24 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16v2za-00043e-00 for ; Tue, 09 Apr 2002 17:17:30 -0400 Date: Tue, 09 Apr 2002 14:17:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: PATCH: Further gdbserver cleanups Message-ID: <20020409171730.A14856@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20020406133335.A26201@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020406133335.A26201@nevyn.them.org> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-04/txt/msg00376.txt.bz2 On Sat, Apr 06, 2002 at 01:33:35PM -0500, Daniel Jacobowitz wrote: > This patch adds -Wall to gdbserver's build options, cleans up everything > that it turned up, and adds the beginnings of a target stack. It also adds > a simplistic mechanism to track child processes opaquely; for instance, for > per-child regcaches. No real new functionality here, but it should be > pretty obvious where I'm going. The next batch of changes are likely to be > more interesting. > > I'll check this in in a day or two if no one objects (well, and when Andrew > thinks it's been long enough and checks in the relevant MAINTAINERS patch). Committed in two parts, as Andrew wisely advised. First: 2002-04-09 Daniel Jacobowitz * gdbserver/Makefile.in: Add WARN_CFLAGS. Update configury dependencies. * gdbserver/configure.in: Check for * gdbserver/configure: Regenerate. * gdbserver/config.in: Regenerate. * gdbserver/gdbreplay.c: Include needed system headers. (remote_open): Remove strchr prototype. * gdbserver/linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS. * gdbserver/regcache.c (supply_register): Change buf argument to const void *. (supply_register_by_name): Likewise. (collect_register): Change buf argument to void *. (collect_register_by_name): Likewise. * gdbserver/regcache.h: Add missing prototypes. * gdbserver/remote-utils.c: Include for inet_ntoa. * gdbserver/server.c (handle_query): New function. (attached): New static variable, moved out of main. (main): Quiet longjmp clobber warnings. * gdbserver/server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes. * gdbserver/utils.c (error): Remove NORETURN. (fatal): Likewise. Then the rest: 2002-04-09 Daniel Jacobowitz * gdbserver/inferiors.c: New file. * gdbserver/target.c: New file. * gdbserver/target.h: New file. * gdbserver/Makefile.in: Add target.o and inferiors.o. Update dependencies. * gdbserver/linux-low.c (inferior_pid): New static variable, moved from server.c. (linux_create_inferior): Renamed from create_inferior. Call add_inferior. Return 0 on success instead of a PID. (linux_attach): Renamed from myattach. (linux_kill): Renamed from kill_inferior. Call clear_inferiors (). (linux_thread_alive): Renamed from mythread_alive. (linux_wait): Renamed from mywait. Call clear_inferiors () if the child dies. (linux_resume): Renamed from myresume. Add missing ``return 0''. (regsets_store_inferior_registers): Correct error message. Add missing ``return 0''. (linux_fetch_registers): Renamed from fetch_inferior_registers. (linux_store_registers): Renamed from store_inferior_registers. (linux_read_memory): Renamed from read_inferior_memory. (linux_write_memory): Renamed from write_inferior_memory. (linux_target_ops): New structure. (initialize_low): Call set_target_ops (). * gdbserver/remote-utils.c (unhexify): New function. (hexify): New function. (input_interrupt): Send signals to ``signal_pid''. * gdbserver/server.c (inferior_pid): Remove. (start_inferior): Update create_inferior call. (attach_inferior): Call add_inferior. (handle_query): New function. (main): Call handle_query for `q' packets. * gdbserver/server.h: Include "target.h". Remove obsolete prototypes. Add prototypes for "inferiors.c", "target.c", hexify, and unhexify. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer