This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: PR4186: cross-compilation, $ARCH


On Tue, 2009-08-25 at 10:50 -0400, Frank Ch. Eigler wrote:
> > [...]
> > - Are we planning on extending '%arch' (or perhaps adding '%user_arch')
> > to tell the difference between 32-bit and 64-bit user exes?
> 
> This would makes sense only as a per-probe-point construct, since the
> same stap script on a 64-bit host can instrument 32- and 64-bit
> userspace programs just fine.

We actually have this BTW. The various tapset/<arch>/register.stp
tapsets define it when appropriate for the arch as:

function probing_32bit_app() %{ /* pure */
        THIS->__retvalue = _stp_probing_32bit_app(CONTEXT->regs);
%}

Where _stp_probing_32bit_app is defined in runtime/regs.c for various
#if defined(ARCH) settings.

(Note that it relies on the probe context having CONTEXT->regs, if not
then it always returns false.)

Cheers,

Mark


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