0

当我在 android 上执行命令“staprun”时,我遇到了以下问题:

# /data/systemtap-1.0-omap/bin/staprun /data/local/msyscall_all.ko
  /data/systemtap-1.0-omap/bin/staprun: 1: Syntax error: "(" unexpected
#

模块 msyscall_all.ko 与我的 android 运行的内核交叉编译。

首先,我确信 msyscall_all.ko 是完全正确的,因为我使用命令“insomd”和“lsmod”来确保它是正确的。我这样做如下:

# lsmod
 omaplfb 8986 0 - Live 0xbf032000
 pvrsrvkm 137346 29 omaplfb, Live 0xbf000000
# insmod /data/local/msyscall_all.ko
# lsmod
  msyscall_all 1121778 0 - Live 0xbf037000
  omaplfb 8986 0 - Live 0xbf032000
  pvrsrvkm 137346 29 omaplfb, Live 0xbf000000
# 

其次,我按照以下说明进行操作:http: //omappedia.org/wiki/Systemtap#Systemtap_1.0_code_update_for_OMAP_ARM_platforms

而且我的systemtap-1.0-omap 交叉编译成功!!但是,在我使用“adb push”将 systemtap-1.0-omap 推送到我的 android 设备并运行它之后,我收到以下错误:

/data/systemtap-1.0-omap/bin/staprun:1:语法错误:“(”意外

当在 ubuntu 上运行“staprun”时,它给了我如何运行“staprun”的建议,当它在 android 设备上运行时,它出错了:

# /data/systemtap-1.0-omap/bin/staprun
  /data/systemtap-1.0-omap/bin/staprun: 1: Syntax error: "(" unexpected
# exit
ubuntu@ubuntu:~$ cd systemtap-1.0-omap/bin/
ubuntu@ubuntu:~/systemtap-1.0-omap/bin$ ./staprun 
ERROR: Need a module name or path to load.

./staprun [-v]  [-c cmd ] [-x pid] [-u user] [-A|-L|-d]
  [-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]
  -v              Increase verbosity.
  -c cmd          Command 'cmd' will be run and staprun will
                  exit when it does.  The '_stp_target' variable
                  will contain the pid for the command.
  -x pid          Sets the '_stp_target' variable to pid.
  -o FILE         Send output to FILE. This supports strftime(3)
                  formats for FILE.
  -b buffer size  The systemtap module specifies a buffer size.
                  Setting one here will override that value.  The
                  value should be an integer between 1 and 4095 
                  which be assumed to be the buffer size in MB.
                  That value will be per-cpu in bulk mode.
  -L              Load module and start probes, then detach.
  -A              Attach to loaded systemtap module.
  -d              Delete a module.  Only detached or unused modules
                  the user has permission to access will be deleted. Use "*"
                  (quoted) to delete all unused modules.
  -D              Run in background. This requires '-o' option.
  -S size[,N]     Switches output file to next file when the size
                  of file reaches the specified size. The value
                  should be an integer greater than 1 which is
                  assumed to be the maximum file size in MB.
                  When the number of output files reaches N, it
                  switches to the first output file. You can omit
                  the second argument.
  MODULE can be either a module name or a module path.  If a
  module name is used, it is looked for in the following
  directory: /lib/modules/`uname -r`/systemtap
ubuntu@ubuntu:~/systemtap-1.0-omap/bin$ 

我已经尽力了,但我无法解决它!

4

0 回答 0