Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: remove redundant code in ada-lang.c
@ 2006-11-30  0:31 Jim Blandy
  2006-12-01  0:07 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2006-11-30  0:31 UTC (permalink / raw)
  To: gdb-patches


I don't have an Ada compiler handy, so I can't test this, but does
this look right, Joel?  It seems to me that since
ada_value_primitive_packed_val is passed arr as its 'obj' parameter,
v's lvalue type should already be set accordingly.

2006-11-22  Jim Blandy  <jimb@codesourcery.com>

	* ada-lang.c (value_subscript_packed): Don't bother to set the
	lvalue type of the returned value here;
	ada_value_primitive_packed_val takes care of that.

Index: gdb-jimb-browse/gdb/ada-lang.c
===================================================================
--- gdb-jimb-browse.orig/gdb/ada-lang.c	2006-11-29 14:59:32.000000000 -0800
+++ gdb-jimb-browse/gdb/ada-lang.c	2006-11-29 15:06:43.393216000 -0800
@@ -1887,10 +1887,6 @@
 
   v = ada_value_primitive_packed_val (arr, NULL, elt_off, bit_off,
                                       bits, elt_type);
-  if (VALUE_LVAL (arr) == lval_internalvar)
-    VALUE_LVAL (v) = lval_internalvar_component;
-  else
-    VALUE_LVAL (v) = VALUE_LVAL (arr);
   return v;
 }
 


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

* Re: RFA: remove redundant code in ada-lang.c
  2006-11-30  0:31 RFA: remove redundant code in ada-lang.c Jim Blandy
@ 2006-12-01  0:07 ` Joel Brobecker
  2006-12-01  0:38   ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2006-12-01  0:07 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

Hi Jim,

> I don't have an Ada compiler handy, so I can't test this, but does
> this look right, Joel?  It seems to me that since
> ada_value_primitive_packed_val is passed arr as its 'obj' parameter,
> v's lvalue type should already be set accordingly.
> 
> 2006-11-22  Jim Blandy  <jimb@codesourcery.com>
> 
> 	* ada-lang.c (value_subscript_packed): Don't bother to set the
> 	lvalue type of the returned value here;
> 	ada_value_primitive_packed_val takes care of that.

Paul Hilfinger reviewed the patch for us and said that it looked good.
I tested it on my laptop and showed no regression.

Thanks for the patch!
-- 
Joel


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

* Re: RFA: remove redundant code in ada-lang.c
  2006-12-01  0:07 ` Joel Brobecker
@ 2006-12-01  0:38   ` Jim Blandy
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2006-12-01  0:38 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches


Joel Brobecker <brobecker@adacore.com> writes:
>> I don't have an Ada compiler handy, so I can't test this, but does
>> this look right, Joel?  It seems to me that since
>> ada_value_primitive_packed_val is passed arr as its 'obj' parameter,
>> v's lvalue type should already be set accordingly.
>> 
>> 2006-11-22  Jim Blandy  <jimb@codesourcery.com>
>> 
>> 	* ada-lang.c (value_subscript_packed): Don't bother to set the
>> 	lvalue type of the returned value here;
>> 	ada_value_primitive_packed_val takes care of that.
>
> Paul Hilfinger reviewed the patch for us and said that it looked good.
> I tested it on my laptop and showed no regression.

Committed --- thanks!


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

end of thread, other threads:[~2006-12-01  0:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30  0:31 RFA: remove redundant code in ada-lang.c Jim Blandy
2006-12-01  0:07 ` Joel Brobecker
2006-12-01  0:38   ` Jim Blandy

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