This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: cannot trace user-level code in cross compilation environment
- From: Josh Stone <jistone at redhat dot com>
- To: Zhiwei Ying <zhiwei dot ying at gmail dot com>
- Cc: systemtap <systemtap at sources dot redhat dot com>
- Date: Fri, 01 Apr 2011 11:25:11 -0700
- Subject: Re: cannot trace user-level code in cross compilation environment
- References: <AANLkTin4+Q1r4j1LBKhv-x5-wXYf5CvryNTbOt3x71N1@mail.gmail.com>
On 04/01/2011 02:05 AM, Zhiwei Ying wrote:
> Hi,
>
> I built a systemtap1.4 on ubuntu 10.4 32 bits. And also cross-compile
> staprun to a develop board with kernel 2.6.35 x86.
>
> On the host pc side,
>
> stap -r /target-board/kernel xxx.stp -p 4 -m traceauto.ko
>
> then copy the traceauto.ko to the board,
> staprun -u -v -m traceauto.ko -c ./hello
>
>
> xxx.stp
> probe process("/ddtv/tracedrv/test/dhg/hello/hello").function("*").call
Is your "hello" binary at the same path on the host and target? The
runtime looks for probe targets based on the path, so it will never
notice if the application is started from a different path.
There's a bug open to address this, but for now the only workaround is
to copy or link the binary to matching locations on the host and target.
http://sourceware.org/bugzilla/show_bug.cgi?id=12331
Josh