This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug uprobes/14774] process.statement("*@file:*") probes don't match all functions


http://sourceware.org/bugzilla/show_bug.cgi?id=14774

--- Comment #1 from Daniel Tschan <tschan+sourceware at devzone dot ch> 2012-10-27 16:10:51 UTC ---
Created attachment 6704
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6704
Proposed bug fix

Tracked down the bug to the method iterate_over_srcfile_lines in dwflpp.cxx by
using systemtap on itself:

  if (line_type == RELATIVE)
    {
      // body omitted
    }
  else if (line_type == WILDCARD)
    function_line (&lineno);
  else if (line_type == RANGE) { /* correct lineno */
    // body ommited
  }

  for (int l = lineno; ; l = l + 1)
    {
      // body ommited
    }

If both function name and line number are wildcards the above code matches a
"random" function in the source file an sets lineno to its start. The following
code then only looks a this matched function an all functions defined later in
the source file.
The attached patch seems to fix this problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]