[PATCH 3/6] DWARF-5 basic functionality

Jan Kratochvil jkratoch@redhat.com
Wed Feb 22 18:42:00 GMT 2017


On Wed, 22 Feb 2017 12:36:18 +0100, Nick Clifton wrote:
> >        if (compunit.cu_version != 2
> >  	  && compunit.cu_version != 3
> > -	  && compunit.cu_version != 4)
> > +	  && compunit.cu_version != 4
> > +	  && compunit.cu_version != 5)
> 
> There are going to be lots of these range checks in readelf now.  You might 
> as well add a macro, eg IN_RANGE(LOW,HIGH), and use that to make the code
> shorter.

As you made it optional I have used:

-      if (compunit.cu_version != 2
-         && compunit.cu_version != 3
-         && compunit.cu_version != 4)
+      if (compunit.cu_version < 2 || compunit.cu_version > 5)


Thanks,
Jan



More information about the Binutils mailing list