This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/14000] New: crosscompiled uprobe target filename doesn't have the sysroot path removed.
- From: "adrian.m.negreanu at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 19 Apr 2012 15:20:32 +0000
- Subject: [Bug translator/14000] New: crosscompiled uprobe target filename doesn't have the sysroot path removed.
- Auto-submitted: auto-generated
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.