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]

[Bug translator/14000] New: crosscompiled uprobe target filename doesn't have the sysroot path removed.


http://sourceware.org/bugzilla/show_bug.cgi?id=14000

             Bug #: 14000
           Summary: crosscompiled uprobe target filename doesn't have the
                    sysroot path removed.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: adrian.m.negreanu@intel.com
    Classification: Unclassified


Created attachment 6351
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6351
jni.stp

I'm using the jni.stp script(attached) to use a systemtap marker from
libdvm.so.

The stap command I use is:
 sudo env PATH=$PATH stap -k -a i386 --sysroot=$DIRECTORY_WITH_I386_BINS -r
$DIRECTORY_WITH_I386_BINS/kernel -B CROSS_COMPILE=i686-unknown-linux- -m jni
jni.ko

In the generated /tmp/stap*/jni_src.c, where stap_inode_uprobe_targets is
initialized,
you can see that the whole path($DIRECTORY_WITH_I386_BINS) is used, and not the
one in the jni.stp:process()

   504 static struct stapiu_target stap_inode_uprobe_targets[] = {
   505   { .finder={ .mmap_callback=&stapiu_mmap_found, 
.munmap_callback=&stapiu_munmap_found,  .callback=&stapiu_process_munmap, }
   506   , .filename="/home/adrian/out/symbols/system/lib/libdvm.so", },
   507 };

As a fix, I used this:

diff --git a/tapsets.cxx b/tapsets.cxx
index 97cedc0..97db37c 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -6187,7 +6187,7 @@ sdt_query::handle_probe_entry()
            section = ".absolute";

          uprobe_derived_probe* p =
-           new uprobe_derived_probe ("", "", 0, q.module_val, section,
+           new uprobe_derived_probe ("", "", 0,
path_remove_sysroot(sess,q.module_val), section,
                                      q.statement_num_val, reloc_addr, q, 0);
          p->saveargs (arg_count);
          results.push_back (p);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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