Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christophe LYON <christophe.lyon@st.com>
To: gdb-patches@sources.redhat.com
Subject: testsuite gdb.base/constvars: force allocation of local variables
Date: Wed, 08 Nov 2006 13:52:00 -0000	[thread overview]
Message-ID: <4551E0F4.7030803@st.com> (raw)

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 */
    /*



             reply	other threads:[~2006-11-08 13:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-08 13:52 Christophe LYON [this message]
2006-11-08 15:06 ` Daniel Jacobowitz
2006-11-08 16:16   ` Christophe LYON
2006-11-08 16:15 ` Daniel Jacobowitz
2006-11-08 16:43   ` Christophe LYON
2006-11-08 16:53     ` Daniel Jacobowitz
2006-11-09  9:25       ` Frederic RISS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4551E0F4.7030803@st.com \
    --to=christophe.lyon@st.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox