This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] macroexp, "small values for initial testing"
- From: Jim Blandy <jimb at codesourcery dot com>
- To: msnyder at sonic dot net
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 05 Aug 2007 14:41:51 -0700
- Subject: Re: [RFC] macroexp, "small values for initial testing"
- References: <16572.12.7.175.2.1186288136.squirrel@webmail.sonic.net>
Thanks --- I've committed the following:
ChangeLog:
2007-08-05 Jim Blandy <jimb@codesourcery.com>
* macroexp.c (init_buffer): Remove testing code that overrides the
caller's length guess.
(gather_arguments): Use a larger initial size, now that the vector
growth code has been exercised.
Index: macroexp.c
===================================================================
RCS file: /cvs/src/src/gdb/macroexp.c,v
retrieving revision 1.10
diff -u -r1.10 macroexp.c
--- macroexp.c 9 Jan 2007 17:58:52 -0000 1.10
+++ macroexp.c 5 Aug 2007 21:40:42 -0000
@@ -81,9 +81,6 @@
static void
init_buffer (struct macro_buffer *b, int n)
{
- /* Small value for initial testing. */
- n = 1;
-
b->size = n;
if (n > 0)
b->text = (char *) xmalloc (n);
@@ -715,7 +712,7 @@
get_token (&tok, src);
args_len = 0;
- args_size = 1; /* small for initial testing */
+ args_size = 6;
args = (struct macro_buffer *) xmalloc (sizeof (*args) * args_size);
for (;;)