summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-08-06 14:35:08 -0400
committerDave Brolley <brolley@redhat.com>2009-08-06 14:35:08 -0400
commit6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1 (patch)
treee4ddccdf7613a7788ad74bbc18727d35abf133fe /tapsets.cxx
parent3c96130fde2f114d0ecca13870ac91b00219cf6c (diff)
parentcab97f033153b93d1d26388a25a65052cf36fc8d (diff)
downloadsystemtap-steved-6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1.tar.gz
systemtap-steved-6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1.tar.xz
systemtap-steved-6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx34
1 files changed, 32 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index b1ca2998..c953dd78 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1452,7 +1452,7 @@ query_cu (Dwarf_Die * cudie, void * arg)
for (set<char const *>::const_iterator i = q->filtered_srcfiles.begin();
i != q->filtered_srcfiles.end(); ++i)
q->dw.iterate_over_srcfile_lines (*i, q->line, q->has_statement_str,
- q->line_type, query_srcfile_label, q);
+ q->line_type, query_srcfile_label, q->function, q);
}
else if ((q->has_statement_str || q->has_function_str)
&& (q->spec_type == function_file_and_line))
@@ -1462,7 +1462,7 @@ query_cu (Dwarf_Die * cudie, void * arg)
for (set<char const *>::const_iterator i = q->filtered_srcfiles.begin();
i != q->filtered_srcfiles.end(); ++i)
q->dw.iterate_over_srcfile_lines (*i, q->line, q->has_statement_str,
- q->line_type, query_srcfile_line, q);
+ q->line_type, query_srcfile_line, q->function, q);
}
else
{
@@ -3030,6 +3030,8 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
// Make it look like the IP is set as it wouldn't have been replaced
// by a breakpoint instruction when calling real probe handler. Reset
// IP regs on return, so we don't confuse kprobes. PR10458
+ // But only for architectures where REG_IP is a proper lvalue. PR10491
+ s.op->newline() << "#ifdef REG_IP_LVALUE";
s.op->newline() << "{";
s.op->indent(1);
s.op->newline() << "unsigned long kprobes_ip = REG_IP(c->regs);";
@@ -3037,6 +3039,9 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "(*sdp->ph) (c);";
s.op->newline() << "REG_IP(regs) = kprobes_ip;";
s.op->newline(-1) << "}";
+ s.op->newline() << "#else";
+ s.op->newline() << "(*sdp->ph) (c);";
+ s.op->newline() << "#endif";
common_probe_entryfn_epilogue (s.op);
s.op->newline() << "return 0;";
@@ -3064,6 +3069,8 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
// Make it look like the IP is set as it wouldn't have been replaced
// by a breakpoint instruction when calling real probe handler. Reset
// IP regs on return, so we don't confuse kprobes. PR10458
+ // But only for architectures where REG_IP is a proper lvalue. PR10491
+ s.op->newline() << "#ifdef REG_IP_LVALUE";
s.op->newline() << "{";
s.op->indent(1);
s.op->newline() << "unsigned long kprobes_ip = REG_IP(c->regs);";
@@ -3071,6 +3078,9 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "(*sdp->ph) (c);";
s.op->newline() << "REG_IP(regs) = kprobes_ip;";
s.op->newline(-1) << "}";
+ s.op->newline() << "#else";
+ s.op->newline() << "(*sdp->ph) (c);";
+ s.op->newline() << "#endif";
common_probe_entryfn_epilogue (s.op);
s.op->newline() << "return 0;";
@@ -4447,6 +4457,8 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
// Make it look like the IP is set as it would in the actual user
// task when calling real probe handler. Reset IP regs on return, so
// we don't confuse uprobes. PR10458
+ // But only for architectures where REG_IP is a proper lvalue. PR10491
+ s.op->newline() << "#ifdef REG_IP_LVALUE";
s.op->newline() << "{";
s.op->indent(1);
s.op->newline() << "unsigned long uprobes_ip = REG_IP(c->regs);";
@@ -4454,6 +4466,9 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "(*sups->ph) (c);";
s.op->newline() << "REG_IP(regs) = uprobes_ip;";
s.op->newline(-1) << "}";
+ s.op->newline() << "#else";
+ s.op->newline() << "(*sdp->ph) (c);";
+ s.op->newline() << "#endif";
common_probe_entryfn_epilogue (s.op);
s.op->newline(-1) << "}";
@@ -4470,6 +4485,8 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
// Make it look like the IP is set as it would in the actual user
// task when calling real probe handler. Reset IP regs on return, so
// we don't confuse uprobes. PR10458
+ // But only for architectures where REG_IP is a proper lvalue. PR10491
+ s.op->newline() << "#ifdef REG_IP_LVALUE";
s.op->newline() << "{";
s.op->indent(1);
s.op->newline() << "unsigned long uprobes_ip = REG_IP(c->regs);";
@@ -4477,6 +4494,9 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "(*sups->ph) (c);";
s.op->newline() << "REG_IP(regs) = uprobes_ip;";
s.op->newline(-1) << "}";
+ s.op->newline() << "#else";
+ s.op->newline() << "(*sdp->ph) (c);";
+ s.op->newline() << "#endif";
common_probe_entryfn_epilogue (s.op);
s.op->newline(-1) << "}";
@@ -4970,6 +4990,8 @@ kprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
// Make it look like the IP is set as it wouldn't have been replaced
// by a breakpoint instruction when calling real probe handler. Reset
// IP regs on return, so we don't confuse kprobes. PR10458
+ // But only for architectures where REG_IP is a proper lvalue. PR10491
+ s.op->newline() << "#ifdef REG_IP_LVALUE";
s.op->newline() << "{";
s.op->indent(1);
s.op->newline() << "unsigned long kprobes_ip = REG_IP(c->regs);";
@@ -4977,6 +4999,9 @@ kprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "(*sdp->ph) (c);";
s.op->newline() << "REG_IP(regs) = kprobes_ip;";
s.op->newline(-1) << "}";
+ s.op->newline() << "#else";
+ s.op->newline() << "(*sdp->ph) (c);";
+ s.op->newline() << "#endif";
common_probe_entryfn_epilogue (s.op);
s.op->newline() << "return 0;";
@@ -5004,6 +5029,8 @@ kprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
// Make it look like the IP is set as it wouldn't have been replaced
// by a breakpoint instruction when calling real probe handler. Reset
// IP regs on return, so we don't confuse kprobes. PR10458
+ // But only for architectures where REG_IP is a proper lvalue. PR10491
+ s.op->newline() << "#ifdef REG_IP_LVALUE";
s.op->newline() << "{";
s.op->indent(1);
s.op->newline() << "unsigned long kprobes_ip = REG_IP(c->regs);";
@@ -5011,6 +5038,9 @@ kprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "(*sdp->ph) (c);";
s.op->newline() << "REG_IP(regs) = kprobes_ip;";
s.op->newline(-1) << "}";
+ s.op->newline() << "#else";
+ s.op->newline() << "(*sdp->ph) (c);";
+ s.op->newline() << "#endif";
common_probe_entryfn_epilogue (s.op);
s.op->newline() << "return 0;";