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: [RFA 1/2] mips: Switch inferior function calls to ON_STACK method.


On Tue, 8 May 2012, Joel Brobecker wrote:

> Attached is the latest version.
> 
> It's very very slightly different from the version you suggested,
> in the fact that I didn't create a local variable for the breakpoint
> address, and stored it in *bp_addr directly.  I didn't see a real
> purpose for having a local variable in this case.  I did create
> a local variable for the nop instruction address, however. I found
> that it did make things a little clearer for that one.

 That variable was expected to save some memory accesses.  Your version 
should be equally good, I think -- there's no function call between 
setting *bp_addr and reading it back, it's not volatile, so any sane 
compiler should keep it in a register and do not really make that 
read-back while optimising.  While not optimising that probably does not 
matter.  And given it's your code, you're of course free to write it your 
style as long as it's functionally correct and comprehensible for the 
average GDB developer.

> As before, I'm attaching two patches, the first being the last
> version of the patch, and the second being the changes introduced
> by this iteration.

 I'm fine with this version.

> Testec on mips-irix with no regression.  If we'd rather go with
> AT_ENTRY_POINT instead, at least the patch is available here for
> the record.

 I have no strong opinion either way -- as we discussed both choices work 
equally well for the common cases and both have their corner-case 
advantages and disadvantages, none of which seem to directly hit any one 
of us.  What are the reasons for other targets we support to have chosen 
their particular way?

  Maciej


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