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: [PATCH] sim: add --map-info option


On Tuesday, December 14, 2010 23:54:07 Joel Brobecker wrote:
> > > Wouldn't it make sense to hoist the assignment to memory out of
> > > the for initial assignment? It's never changed during the loop...
> > 
> > i dont understand ... isnt this the whole purpose of the first clause
> > of the for statement ?  initializing things once that dont change
> > inside of the loop.
> 
> The code works, and I'm fine if you really want to keep it that way.
> But you said "initializing things once that dont change inside of the
> loop" and that is not true.  You would typically initialize the
> variables used in the looping condition, and these variables change
> at each iteration.

*shrug* i guess we view the purpose of the first clause slightly differently.  
i'm ok with changing the style as you suggest since that seems to be the more 
common method used in the rest of the code base.

so i've committed this now with the memory init moved to the memory decl.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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