Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] ``struct value'' cleanups
@ 2002-03-16 17:04 Andrew Cagney
  2002-03-16 17:17 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-03-16 17:04 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

Hello,

The attatched are some simple cleanups for ``struct value''.  Committed.

Andrew

PS: As far as I can tell, the unused bit of code was added '94 and from 
day one it included the comment ``when is this used'.

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1201 bytes --]

2002-03-16  Andrew Cagney  <ac131313@redhat.com>

	* value.h (struct value): Delete field ``substring_addr''.  Change
	aligner fields to force_doublest_align, force_longest_align,
	force_core_addr_align and force_pointer_align.

Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.27
diff -u -r1.27 value.h
--- value.h	2002/03/16 02:57:42	1.27
+++ value.h	2002/03/17 00:52:51
@@ -125,14 +125,6 @@
        list.  */
     struct value *next;
 
-    /* ??? When is this used?  */
-    union
-      {
-	CORE_ADDR memaddr;
-	char *myaddr;
-      }
-    substring_addr;
-
     /* Register number if the value is from a register.  Is not kept
        if you take a field of a structure that is stored in a
        register.  Shouldn't it be?  */
@@ -166,9 +158,10 @@
     union
       {
 	long contents[1];
-	double force_double_align;
-	LONGEST force_longlong_align;
-	char *literal_data;
+	DOUBLEST force_doublest_align;
+	LONGEST force_longest_align;
+	CORE_ADDR force_core_addr_align;
+	void *force_pointer_aligh;
       }
     aligner;
     /* Do not add any new members here -- contents above will trash them */

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

* Re: [patch] ``struct value'' cleanups
  2002-03-16 17:04 [patch] ``struct value'' cleanups Andrew Cagney
@ 2002-03-16 17:17 ` Daniel Jacobowitz
  2002-03-16 17:28   ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-03-16 17:17 UTC (permalink / raw)
  To: gdb-patches

On Sat, Mar 16, 2002 at 08:04:18PM -0500, Andrew Cagney wrote:
> @@ -166,9 +158,10 @@
>      union
>        {
>  	long contents[1];
> -	double force_double_align;
> -	LONGEST force_longlong_align;
> -	char *literal_data;
> +	DOUBLEST force_doublest_align;
> +	LONGEST force_longest_align;
> +	CORE_ADDR force_core_addr_align;
> +	void *force_pointer_aligh;
>        }
>      aligner;
>      /* Do not add any new members here -- contents above will trash them */

(I suppose literal_data was not actually used anywhere either?  It
seems different than the other members...)

Typo, force_pointer_aligh.
                        ^


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [patch] ``struct value'' cleanups
  2002-03-16 17:17 ` Daniel Jacobowitz
@ 2002-03-16 17:28   ` Andrew Cagney
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-03-16 17:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

> On Sat, Mar 16, 2002 at 08:04:18PM -0500, Andrew Cagney wrote:
> 
>> @@ -166,9 +158,10 @@
>> union
>> {
>> long contents[1];
>> -	double force_double_align;
>> -	LONGEST force_longlong_align;
>> -	char *literal_data;
>> +	DOUBLEST force_doublest_align;
>> +	LONGEST force_longest_align;
>> +	CORE_ADDR force_core_addr_align;
>> +	void *force_pointer_aligh;
>> }
>> aligner;
>> /* Do not add any new members here -- contents above will trash them */
> 
> 
> (I suppose literal_data was not actually used anywhere either?  It
> seems different than the other members...)

Rebuilt after the change and a grep didn't show anything.

> Typo, force_pointer_aligh.

I'm tempted to leave it in just to see if it also manages to remain 
there for 8 years :-) (thanks)

Andrew





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

end of thread, other threads:[~2002-03-17  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-16 17:04 [patch] ``struct value'' cleanups Andrew Cagney
2002-03-16 17:17 ` Daniel Jacobowitz
2002-03-16 17:28   ` Andrew Cagney

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