Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



On Tue, Nov 03, 2009 at 12:12:17PM -0800, Jason Thorpe wrote:
> 
> On Nov 2, 2009, at 9:08 PM, David Young wrote:
> 
> > Module Name:        src
> > Committed By:       dyoung
> > Date:               Tue Nov  3 05:08:19 UTC 2009
> > 
> > Modified Files:
> >     src/sys/arch/i386/i386: copy.S
> > Added Files:
> >     src/share/man/man9/man9.i386: return_address.9
> >     src/sys/arch/i386/include: return.h
> > 
> > Log Message:
> > Add return_address(9) for reading the Nth return address from the call
> > stack.
> 
> What's the intended usage?  How is __builtin_return_address() not sufficient?

'options SPLDEBUG' uses it to log the call stack when splraise(IPL_HIGH)
is raised.

Now that we have it, I will probably use it all over. :-)

I used to use __builtin_return_address(n), but for n > 0 it can probe
arbitrary addresses, leading to supervisor page faults.  It happens in
software interrupts, especially.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index