* [Bug translator/11376] New: process(pid).statement(addr).absolute bugs + fix
@ 2010-03-13 22:07 jkenisto at us dot ibm dot com
2010-03-15 17:09 ` [Bug translator/11376] " fche at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: jkenisto at us dot ibm dot com @ 2010-03-13 22:07 UTC (permalink / raw)
To: systemtap
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-01 19:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-11376-1110@http.sourceware.org/bugzilla/>
2010-11-01 19:11 ` [Bug translator/11376] process(pid).statement(addr).absolute bugs + fix fche at redhat dot com
2010-03-13 22:07 [Bug translator/11376] New: " jkenisto at us dot ibm dot com
2010-03-15 17:09 ` [Bug translator/11376] " fche at redhat dot com
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).