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: cannot trace user-level code in cross compilation environment


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


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