This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
GDB stubs - remove unused static variables
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 02 Apr 2003 12:49:20 -0700
- Subject: GDB stubs - remove unused static variables
Since the linker doesn't...
Index: hal/common/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/ChangeLog,v
retrieving revision 1.88
diff -u -5 -p -r1.88 ChangeLog
--- hal/common/current/ChangeLog 3 Mar 2003 17:09:56 -0000 1.88
+++ hal/common/current/ChangeLog 2 Apr 2003 19:46:42 -0000
@@ -1,5 +1,11 @@
+2003-04-02 Gary Thomas <gary at mlbassoc dot com>
+
+ * src/generic-stub.c:
+ * include/generic-stub.h: Cleanup when program args are not
+ supported (remove some unused static storage).
+
2003-03-03 Knud Woehler <knud dot woehler at microplex dot de>
* src/hal_if.c:
* include/hal_if.h: Add CYGNUM_CALL_IF_FLASH_FIS_OP. FIS read
via the virtual vector table.
Index: hal/common/current/include/generic-stub.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/include/generic-stub.h,v
retrieving revision 1.14
diff -u -5 -p -r1.14 generic-stub.h
--- hal/common/current/include/generic-stub.h 29 Aug 2002 16:15:33 -0000 1.14
+++ hal/common/current/include/generic-stub.h 2 Apr 2003 19:45:51 -0000
@@ -7,10 +7,11 @@
//========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
@@ -288,17 +289,19 @@ extern char *__mem2hex (char *mem, char
If MAY_FAULT is non-zero, memory faults are trapped; if a fault occurs,
a NULL value will be returned.
Otherwise, the value returned is one byte past the last byte written. */
extern char *__hex2mem (char *buf, char *mem, int count, int may_fault);
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
/* Set the program arguments passed into the user program's main */
extern void __set_program_args (int argc, char **argv);
/* Return the user program arguments passed in from GDB (via an 'A'
packet). argcPtr is a pointer into the user program, which will hold
the number of arguments; the strings are returned. */
extern char **__get_program_args (target_register_t argcPtr);
+#endif
/* Encode PACKET as a remote protocol packet and send it to GDB; this takes
care of sending the initial '$' character, as well as the trailing '#'
and checksum, and also waits for an ACK from the remote side, resending
as necessary. */
Index: hal/common/current/src/generic-stub.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/src/generic-stub.c,v
retrieving revision 1.29
diff -u -5 -p -r1.29 generic-stub.c
--- hal/common/current/src/generic-stub.c 29 Aug 2002 16:15:34 -0000 1.29
+++ hal/common/current/src/generic-stub.c 2 Apr 2003 19:45:22 -0000
@@ -158,21 +158,22 @@ static int initialized = 0; /* !0 me
static int process_exception (int sigval);
static void do_nothing (void); /* and do it gracefully */
static int syscall_do_nothing (int);
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
void __free_program_args (void);
+static char *__add_program_arg (int argnum, uint32 arglen);
+#endif
volatile __PFI __process_exception_vec = process_exception;
volatile __PFV __process_exit_vec = do_nothing;
volatile __PFI __process_syscall_vec = syscall_do_nothing;
volatile __PFI __process_signal_vec = NULL;
volatile __PFV __init_vec = NULL;
volatile __PFV __cleanup_vec = NULL;
-static char *__add_program_arg (int argnum, uint32 arglen);
-
static const char hexchars[] = "0123456789abcdef";
static void process_query (char *pkt);
static void process_set (char *pkt);
@@ -1784,10 +1785,11 @@ __kill_program (int sigval)
__remcomOutBuffer[2] = hexchars[sigval & 15];
__remcomOutBuffer[3] = 0;
__putpacket (__remcomOutBuffer);
}
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
#define MAX_ARG_COUNT 20
#define MAX_ARGDATA 128
static char *program_argv [MAX_ARG_COUNT];
static int program_argc;
@@ -1867,10 +1869,11 @@ __get_program_args (target_register_t ar
__free_program_args ();
}
__write_mem_safe ((char *) &program_argc, (void *)argcPtr, sizeof (program_argc));
return program_argv;
}
+#endif
/* Table used by the crc32 function to calcuate the checksum. */
static uint32 crc32_table[256];
static int tableInit = 0;
--
------------------------------------------------------------
Gary Thomas |
MLB Associates | Consulting for the
+1 (970) 229-1963 | Embedded world
http://www.mlbassoc.com/ |
email: <gary at mlbassoc dot com> |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------