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 05:52 PM, Zhiwei Ying wrote:
> Yes, the binary in in the same path. if the binary is different,
> staprun will complain "build-id mismatch"
> 
> Here is the detail for my cross-compilation:
> cd systemtap-1.4
> mkdir runtimebuild
> cd runtimebuild
> ../runtime/staprun/configure --host=/crosstarget --prefix=
> make
> make install DESTDIR=/xxx
> 
> cd runtime/uprobes
> #change KDIR in Makefile to crosstarget
> make
> 
> cp staprun, stapio and uprobes to the board
> 
> on the board
> # staprun -v traceauto.ko -b 3 -u -c ./hello.
> stapio:main:33 Using a buffer of 3 MB.
> stapio:start_cmd:200 block briefly
> stapio:stp_main_loop:636 detaching pid 2289
> stapio:start_cmd:219 execing target_cmd ./hello
> hello world
> stapio:cleanup_and_exit:403 detach=0
> end of tracing
> stapio:cleanup_and_exit:420 closing control channel
> staprun:remove_module:213 Module traceauto removed
> 
> Any help is great appreciated!

Please try these three options for stap, when compiling the ko:
  -DDEBUG_UPROBES -DDEBUG_TASK_FINDER -DDEBUG_TASK_FINDER_VMA

This should give much more debugging output to find the problem.

Josh


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