public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Zhiwei Ying <zhiwei.ying@gmail.com>
To: Josh Stone <jistone@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Subject: Re: cannot trace user-level code in cross compilation environment
Date: Wed, 06 Apr 2011 06:03:00 -0000	[thread overview]
Message-ID: <BANLkTingK79i+xL80qoZjPbfXFDhaQrmYg@mail.gmail.com> (raw)
In-Reply-To: <4D9A4C9A.9070205@redhat.com>

Hi Josh,

You are correct. The problem is caused that two files are not in the same path.
I used a soft link to the binary on the host pc side, so in the script
they looks in the same directory, but actually they are not. Systemtap
will expand the softlink into real directory.

Thanks again,
Zhiwei

On Tue, Apr 5, 2011 at 6:56 AM, Josh Stone <jistone@redhat.com> wrote:
> 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
>

      reply	other threads:[~2011-04-06  6:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01  9:05 Zhiwei Ying
2011-04-01 10:59 ` Adrien Kunysz
2011-04-01 12:27   ` Zhiwei Ying
2011-04-01 18:25 ` Josh Stone
2011-04-02  0:52   ` Zhiwei Ying
2011-04-04 22:56     ` Josh Stone
2011-04-06  6:03       ` Zhiwei Ying [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTingK79i+xL80qoZjPbfXFDhaQrmYg@mail.gmail.com \
    --to=zhiwei.ying@gmail.com \
    --cc=jistone@redhat.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).