aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-04-09 21:11:35 +0000
committerDaniel Jacobowitz <drow@false.org>2002-04-09 21:11:35 +0000
commit0729219dab3a669a294ea00f471fe18c4ba65d79 (patch)
tree402766eba5b19f554e3f712f0586b07dcd149798 /gdb/gdbserver/server.c
parent97658e92dfc5dd20031100cf6a3b26d700228613 (diff)
downloadgdb-0729219dab3a669a294ea00f471fe18c4ba65d79.zip
gdb-0729219dab3a669a294ea00f471fe18c4ba65d79.tar.gz
gdb-0729219dab3a669a294ea00f471fe18c4ba65d79.tar.bz2
2002-04-09 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/Makefile.in: Add WARN_CFLAGS. Update configury dependencies. * gdbserver/configure.in: Check for <string.h> * 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 <arpa/inet.h> 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.
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r--gdb/gdbserver/server.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index adaabac..b567688 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -55,6 +55,7 @@ attach_inferior (int pid, char *statusptr, unsigned char *sigptr)
}
extern int remote_debug;
+static int attached;
int
main (int argc, char *argv[])
@@ -64,9 +65,8 @@ main (int argc, char *argv[])
unsigned char signal;
unsigned int len;
CORE_ADDR mem_addr;
- int bad_attach = 0;
- int pid = 0;
- int attached = 0;
+ int bad_attach;
+ int pid;
char *arg_end;
if (setjmp (toplevel))
@@ -75,6 +75,9 @@ main (int argc, char *argv[])
exit (1);
}
+ bad_attach = 0;
+ pid = 0;
+ attached = 0;
if (argc >= 3 && strcmp (argv[2], "--attach") == 0)
{
if (argc == 4