This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
testsuite gdb.base/constvars: force allocation of local variables
- From: Christophe LYON <christophe dot lyon at st dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 08 Nov 2006 14:51:48 +0100
- Subject: testsuite gdb.base/constvars: force allocation of local variables
Hello,
I propose the following patch in order to force allocation of variables
'crass' and 'crisp'.
Christophe.
2006-11-08 Christophe Lyon <christophe.lyon@st.com>
* gdb.base/constvars.c (main): Write to crass and crips, so that
they are allocated by the compiler.
Index: gdb.base/constvars.c
===================================================================
--- gdb.base/constvars.c (revision 96)
+++ gdb.base/constvars.c (working copy)
@@ -169,8 +169,8 @@ main (void)
/* various structs with const members */
- struct crass { char * const ptr; } crass;
- struct crisp { char * const *ptr; } crisp;
+ struct crass { char * const ptr; } crass = { lamprey} ;
+ struct crisp { char * const *ptr; } crisp = { &lamprey} ;
/* misc. references */
/*