This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [obv][commit] Replace one/two use variables with their values


On Mon, 17 Sep 2012 18:32:36 +0800, Yao wrote:
> ... this part.  We define a local variable 'eltlen', and use it
> twice. Isn't a common programming practise?  I don't object to this
> patch, but want to know why do we do this change?

Sorry, I should have mentioned this in my original email. I have been
working on adding support for 64-bit struct offset and sizes, which
meant expansion of the bitpos offset and the type.length to 64-bit. The
discussion is here:

http://sourceware.org/ml/gdb-patches/2012-08/msg00144.html

These commits are an attempt to push in some of the more trivial fixes
independently so that the final changeset is as small as possible. The
net change size is still currently at about 7k lines, so I've not
succeeded all that much with this patch at my goal of reducing the
patch size, but I'm still trying :)

Without these independent patches, the bitpos patch would have all
these local variables expanded to ULONGEST, which is more of a
mechanical change that can be avoided in the large patch.

> > -  else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
> > +  else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type)
> > == 4) regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
> 
> b.t.w, looks your mailer wrap your patch incorrectly.
> 

Sorry about that; I copy-pasted the patch when I should have attached
it, due to which claws mercilessly wrapped it at 72 lines. Will watch
out for this.

Regards,
Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]