This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] Eliminate char buf[MAX_REGISTER_RAW_SIZE]
- From: Andreas Schwab <schwab at suse dot de>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 01 Feb 2003 00:20:09 +0100
- Subject: Re: [patch/rfc] Eliminate char buf[MAX_REGISTER_RAW_SIZE]
- References: <3E3AFFA5.9080902@redhat.com>
Andrew Cagney <ac131313@redhat.com> writes:
|> Hello,
|>
|> Since MAX_REGISTER_RAW_SIZE is implemented using a function the declaration:
|>
|> char buf[MAX_REGISTER_RAW_SIZE];
|>
|> is illegal. (GCC does allow it which is why no one notices :-/).
|>
|> The attached patch updates all obvious (as in found by a grep) occurances
|> of this and changes them to:
|>
|> char *buf = alloca (max_register_raw_size (current_gdbarch));
You have used max_register_size in the patch. Which of the two is
correct?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."