Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* testsuite gdb.base/constvars: force allocation of local variables
@ 2006-11-08 13:52 Christophe LYON
  2006-11-08 15:06 ` Daniel Jacobowitz
  2006-11-08 16:15 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Christophe LYON @ 2006-11-08 13:52 UTC (permalink / raw)
  To: gdb-patches

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: testsuite gdb.base/constvars: force allocation of local variables
  2006-11-08 13:52 testsuite gdb.base/constvars: force allocation of local variables Christophe LYON
@ 2006-11-08 15:06 ` Daniel Jacobowitz
  2006-11-08 16:16   ` Christophe LYON
  2006-11-08 16:15 ` Daniel Jacobowitz
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-11-08 15:06 UTC (permalink / raw)
  To: Christophe LYON; +Cc: gdb-patches

On Wed, Nov 08, 2006 at 02:51:48PM +0100, Christophe LYON wrote:
> Hello,
> 
> I propose the following patch in order to force allocation of variables 
> 'crass' and 'crisp'.

What compiler does this affect?

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: testsuite gdb.base/constvars: force allocation of local variables
  2006-11-08 13:52 testsuite gdb.base/constvars: force allocation of local variables Christophe LYON
  2006-11-08 15:06 ` Daniel Jacobowitz
@ 2006-11-08 16:15 ` Daniel Jacobowitz
  2006-11-08 16:43   ` Christophe LYON
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-11-08 16:15 UTC (permalink / raw)
  To: gdb-patches

Please, reply to the list next time.  This patch is OK if you fix your
formatting.

On Wed, Nov 08, 2006 at 02:51:48PM +0100, Christophe LYON wrote:
> 
> 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.

Tab on the second line there.

> -  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} ;

Space before "}" and not after.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: testsuite gdb.base/constvars: force allocation of local variables
  2006-11-08 15:06 ` Daniel Jacobowitz
@ 2006-11-08 16:16   ` Christophe LYON
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe LYON @ 2006-11-08 16:16 UTC (permalink / raw)
  To: gdb-patches

Daniel Jacobowitz wrote:
> On Wed, Nov 08, 2006 at 02:51:48PM +0100, Christophe LYON wrote:
>> Hello,
>>
>> I propose the following patch in order to force allocation of variables 
>> 'crass' and 'crisp'.
> 
> What compiler does this affect?
> 

The compiler we develop is a retargetting of Open64.


Christophe.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: testsuite gdb.base/constvars: force allocation of local variables
  2006-11-08 16:15 ` Daniel Jacobowitz
@ 2006-11-08 16:43   ` Christophe LYON
  2006-11-08 16:53     ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe LYON @ 2006-11-08 16:43 UTC (permalink / raw)
  To: gdb-patches

Daniel Jacobowitz wrote:
> Please, reply to the list next time.  This patch is OK if you fix your
> formatting.
> 

OK, so here is the revised version:


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


--
Christophe.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: testsuite gdb.base/constvars: force allocation of local variables
  2006-11-08 16:43   ` Christophe LYON
@ 2006-11-08 16:53     ` Daniel Jacobowitz
  2006-11-09  9:25       ` Frederic RISS
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-11-08 16:53 UTC (permalink / raw)
  To: Christophe LYON; +Cc: gdb-patches

On Wed, Nov 08, 2006 at 05:43:41PM +0100, Christophe LYON wrote:
> Daniel Jacobowitz wrote:
> >Please, reply to the list next time.  This patch is OK if you fix your
> >formatting.
> >
> 
> OK, so here is the revised version:

OK, and thanks.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: testsuite gdb.base/constvars: force allocation of local variables
  2006-11-08 16:53     ` Daniel Jacobowitz
@ 2006-11-09  9:25       ` Frederic RISS
  0 siblings, 0 replies; 7+ messages in thread
From: Frederic RISS @ 2006-11-09  9:25 UTC (permalink / raw)
  To: gdb-patches

On Wed, 2006-11-08 at 11:52 -0500, Daniel Jacobowitz wrote:
> On Wed, Nov 08, 2006 at 05:43:41PM +0100, Christophe LYON wrote:
> > Daniel Jacobowitz wrote:
> > >Please, reply to the list next time.  This patch is OK if you fix your
> > >formatting.
> > >
> > 
> > OK, so here is the revised version:
> 
> OK, and thanks.

I checked this in for Christophe with a minor ChangeLog formating fix (2
spaces around the name).


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-11-09  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-08 13:52 testsuite gdb.base/constvars: force allocation of local variables Christophe LYON
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox