This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11376] New: process(pid).statement(addr).absolute bugs + fix
- From: "jkenisto at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 13 Mar 2010 22:07:06 -0000
- Subject: [Bug translator/11376] New: process(pid).statement(addr).absolute bugs + fix
- Reply-to: sourceware-bugzilla at sourceware dot org
stap's original support for uprobes --
process(<pid>).statement(<addr>).absolute[.return]
-- doesn't work for me unless I apply the following patch:
----- cut here ----
--- tapsets.cxx.orig 2010-03-12 16:33:54.084773884 -0800
+++ tapsets.cxx 2010-03-13 13:26:25.523494988 -0800
@@ -4812,13 +4812,15 @@
// only the same fields as we're about to emit.
s.op->line() << " .finder={";
if (p->pid != 0)
- s.op->line() << " .pid=" << p->pid;
+ s.op->line() << " .pid=" << p->pid << ",";
else if (p->section == ".absolute") // proxy for ET_EXEC -> exec()'d
program
{
s.op->line() << " .procname=" << lex_cast_qstring(p->module) << ",";
s.op->line() << " .callback=&stap_uprobe_process_found,";
}
- if (p->section != ".absolute") // ET_DYN
+ if (p->section == "") // .statement(addr).absolute
+ s.op->line() << " .callback=&stap_uprobe_process_found,";
+ else if (p->section != ".absolute") // ET_DYN
{
if (p->has_library && p->sdt_semaphore_addr != 0)
s.op->line() << " .procname=\"" << p->path << "\", ";
----- cut here ----
The missing comma (line 4815) yields a compilation error in phase 4.
Failure to consider null section names (line 4821) apparently yields
code that never calls register_uprobe().
I don't know if these fixes are really the correct ones, but they work
for me: probing 32-bit (cc -m32) programs on my x86_64 Fedora 12 system,
running the weekly stap snapshot from March 6, 2010.
It's kind of an obscure feature, but it can come in handy when doing
exhaustive tests of uprobes on the x86 instruction set (see probe*.awk
attachments to PR #11249) or probing a program with a symbol table but
no DWARF.
--
Summary: process(pid).statement(addr).absolute bugs + fix
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: jkenisto at us dot ibm dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11376
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.