Forw: function and source matching

Frank Ch. Eigler fche@redhat.com
Tue Aug 16 14:03:00 GMT 2005


roland wrote:

> > No.  I mean a natural source-centric search predicate, operating upon
> > all functions defined within (CUs of) the kernel or a module.  
> 
> Does "all functions" mean all functions at CU scope (in C, file-scope
> static, or extern), or all functions at any scope?  [...]

>From the point of view of a programmer, "all functions" means all
functions that make up the program (kernel or module).  These
functions live in source files, and only secondarily in compilation
units or object files.

> > The predicate would select those functions that match the given name
> > pattern, were defined in a file that matches the given pattern, 
> 
> Does "defined in" mean the defining declaration (prototype) is in
> that file. [...]

Of course not, which is why I said "defined" and not "declared".  One
would not set a breakpoint by source co-ordinates of a mere
declaration.  One does that for a function body, which is part of the
definition.

> [...]  If you think it's some fuzzy heuristic and you haven't
> decided what the heuristic is, then say that.  [...]

I think my list of "it is ok if ...  heuristic ..."  adequately
communicates acceptance of implementation-imposed approximations, the
natures of which may become known only during implementation.  For
example, organizing the search by compilation unit (CU) file names
instead of all source files is likely quite all right.


- FChE



More information about the Systemtap mailing list