aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog14
-rw-r--r--gdb/config/alpha/xm-alpha.h34
-rw-r--r--gdb/config/m88k/xm-m88k.h28
-rw-r--r--gdb/config/mips/xm-makeva.h20
-rw-r--r--gdb/config/pa/xm-pa.h28
5 files changed, 20 insertions, 104 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8fc03a..682f68d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,17 @@
+Wed Oct 13 11:47:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * printcmd.c (printf_command): Instead of using makeva* and
+ calling vprintf, just make the appropriate calls to printf.
+ * printcmd.c, config/pa/xm-pa.h, config/mips/xm-makeva.h,
+ config/alpha/xm-alpha.h, config/m88k/xm-m88k.h: Remove all
+ traces of makeva*. My apologies to everyone (including me!)
+ who spent so much time getting it to work on various machines,
+ but look at the bright side, at least you won't have to do it
+ again in the future.
+
+ * printcmd.c (printf_command): Make a cleanup for val_args (fixes
+ a memory leak).
+
Tue Oct 12 22:54:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* config/mips/xm-mips.h: Remove comment about HAVE_SGTTY vs. usleep.
diff --git a/gdb/config/alpha/xm-alpha.h b/gdb/config/alpha/xm-alpha.h
index 5edc862..5274c3b 100644
--- a/gdb/config/alpha/xm-alpha.h
+++ b/gdb/config/alpha/xm-alpha.h
@@ -27,40 +27,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* The alpha has no siginterrupt routine. */
#define NO_SIGINTERRUPT
-/* The alpha stores the first six float parameters below the va_list.
- We make no distinction and store the first six parameters below
- and above the va_list. */
-#define VA_FLOAT_ARGS_SIZE (6*8)
-#define MAKEVA_SIZE(nargs, max_arg_size) \
- return sizeof (makeva_list) + nargs * max_arg_size + VA_FLOAT_ARGS_SIZE;
-#define MAKEVA_START(list) \
- list->argindex = VA_FLOAT_ARGS_SIZE;
-#define MAKEVA_ARG(list, argaddr, argsize) \
-{ \
- memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
- if ((list->argindex - VA_FLOAT_ARGS_SIZE) < VA_FLOAT_ARGS_SIZE) \
- memcpy (&list->aligner.arg_bytes[list->argindex - VA_FLOAT_ARGS_SIZE],\
- argaddr, argsize); \
- list->argindex += argsize; \
-}
-#ifdef __GNUC__
-#define MAKEVA_END(list) \
-{ \
- va_list ret; \
- ret.__base = &(list)->aligner.arg_bytes[VA_FLOAT_ARGS_SIZE]; \
- ret.__offset = 0; \
- return ret; \
-}
-#else
-#define MAKEVA_END(list) \
-{ \
- va_list ret; \
- ret.a0 = &(list)->aligner.arg_bytes[VA_FLOAT_ARGS_SIZE]; \
- ret.offset = 0; \
- return ret; \
-}
-#endif
-
/* HAVE_SGTTY also works, but we have termios, so use it. */
#define HAVE_TERMIOS
diff --git a/gdb/config/m88k/xm-m88k.h b/gdb/config/m88k/xm-m88k.h
index 3ff3512..8f24de9 100644
--- a/gdb/config/m88k/xm-m88k.h
+++ b/gdb/config/m88k/xm-m88k.h
@@ -18,31 +18,3 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define HOST_BYTE_ORDER BIG_ENDIAN
-
-#define MAKEVA_END(list) \
- va_list retval; \
- retval.__va_arg = 0; \
- retval.__va_stk = (int *) (list)->aligner.arg_bytes; \
- retval.__va_reg = (int *) (list)->aligner.arg_bytes; \
- return retval;
-
-/* I don't know whether rounding the arguments to 4 or 8 bytes is correct
- for the 88k, or whether it is just code borrowed from the pa. The issue
- is moot for now, since printf_command only uses argsize of sizeof (int),
- sizeof (double), or sizeof (long long). */
-#define MAKEVA_ARG(list, argaddr, argsize) \
- { \
- int rounded_argsize; \
- if (argsize > 8) \
- /* Currently this never happens; printf_command only uses argsize */ \
- /* of sizeof (int), sizeof (double), or sizeof (long long). */ \
- error ("MAKEVA_ARG not fully written for m88k"); \
- if (argsize <= 4) \
- rounded_argsize = 4; \
- else if (argsize <= 8) \
- rounded_argsize = 8; \
- while ((int)(&list->aligner.arg_bytes[list->argindex]) % rounded_argsize) \
- list->argindex++; \
- memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
- list->argindex += rounded_argsize; \
- }
diff --git a/gdb/config/mips/xm-makeva.h b/gdb/config/mips/xm-makeva.h
index 46974e0..4e002f9 100644
--- a/gdb/config/mips/xm-makeva.h
+++ b/gdb/config/mips/xm-makeva.h
@@ -16,20 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* Mips hosts need aligned va_list arguments. */
-
-#define MAKEVA_ARG(list, argaddr, argsize) \
- { \
- int rounded_argsize; \
- if (argsize > 8) \
- /* Currently this never happens; printf_command only uses argsize */ \
- /* of sizeof (int), sizeof (double), or sizeof (long long). */ \
- error ("MAKEVA_ARG not fully written for mips"); \
- if (argsize <= 4) \
- rounded_argsize = 4; \
- else if (argsize <= 8) \
- rounded_argsize = 8; \
- list->argindex = (list->argindex + rounded_argsize - 1) & -rounded_argsize; \
- memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
- list->argindex += argsize; \
- }
+/* "makeva" is obsolete. This file can probably go away (unless someone
+ can think of some other host thing which is common to various mips
+ machines). */
diff --git a/gdb/config/pa/xm-pa.h b/gdb/config/pa/xm-pa.h
index 4b12910..979609d 100644
--- a/gdb/config/pa/xm-pa.h
+++ b/gdb/config/pa/xm-pa.h
@@ -1,27 +1,5 @@
/* Definitions for all PA machines. */
-#define MAKEVA_START(list) \
- list->argindex = list->nargs * list->max_arg_size;
-
-#define MAKEVA_ARG(list, argaddr, argsize) \
- { \
- int rounded_argsize; \
- if (argsize > 8) \
- /* Currently this never happens; printf_command only uses argsize */ \
- /* of sizeof (int), sizeof (double), or sizeof (long long). */ \
- error ("MAKEVA_ARG not fully written for hp-pa"); \
- if (argsize <= 4) \
- rounded_argsize = 4; \
- else if (argsize <= 8) \
- rounded_argsize = 8; \
- list->argindex -= rounded_argsize; \
- while ((int)(&list->aligner.arg_bytes[list->argindex]) % rounded_argsize) \
- list->argindex--; \
- memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
- }
-
-/* The address of the arglist is the address right after the args
- (which is what you'd expect). */
-#define MAKEVA_END(list) \
- return (va_list) (list->aligner.arg_bytes \
- + list->nargs * list->max_arg_size)
+/* This was created for "makeva", which is obsolete. This file can
+ probably go away (unless someone can think of some other host thing
+ which is common to various pa machines). */