Bug 10467 - Failure in source:line matching aborts further searching
Summary: Failure in source:line matching aborts further searching
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: tapsets (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-31 01:45 UTC by Josh Stone
Modified: 2009-08-12 18:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Stone 2009-07-31 01:45:26 UTC
I discovered this flaw when trying to use the fully-resolved name for a function
probe:

$ stap -l 'kernel.function("send_sigqueue")'
kernel.function("send_sigqueue@kernel/signal.c:1309")
$ stap -l 'kernel.function("send_sigqueue@kernel/signal.c:1309")' --vp 03
[...]
focused on module 'kernel'
selected source file 'arch/x86/kernel/signal.c'
semantic error: libdw failure (dwarf_getsrc_file): no matching address range
semantic error: no match while resolving probe point
kernel.function("send_sigqueue@kernel/signal.c:1309")

It matched arch/x86/kernel/signal.c because we implicitly use a '*/' in front of
source paths.  The arch file is less than 1309 lines long though, so there can't
be any functions there.

However, instead of aborting, we should continue looking at other source files
so we can find the correct function in the plain 'kernel/signal.c'.
Comment 1 Josh Stone 2009-08-12 18:28:23 UTC
Fixed in:

commit e679283a5ae5555db19d613fa3299f96cfc94eb7
Author: Wenji Huang <wenji.huang@oracle.com>
Date:   Mon Aug 10 19:29:50 2009 -0400

    Avoid assertion error for no matched function in statement probe
    
    * dwflpp.cxx (iterate_over_functions): Return for NULL pointer.
    * testsuite/systemtap.base/statement.exp: Add test case.