This is the mail archive of the systemtap@sources.redhat.com 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]

Re: variables in scopes


Roland McGrath wrote:
> This pretty much boils down to PC location to indicate scope,
> and some of the standard ways you want to convert source specifictions to
> PC location.

The latter I have already in the 0.106 code.  It's a 1-to-N mapping: one
source location can map to many mapping: dwarf_getsrc_file().  It's up
to the caller to decide which of the returned addresses will then be
used in the calls to list the symbols in the scope (or search for one).


I don't quite follow this:

> But you don't want to separate that step fully in all cases.
> If specifying scope by source location (perhaps the most common?), that
> lookup can yield many PC results for an inline;

Yes, as said above.  But the address lookup should be separated from the
scope lookup for just this reason: there can be multiple addresses and
even when all of those places need to be looked at, there is separate
code needed for each of the probes which need to be generated.  I.e., if
I set a probe for the beginning of a function which is inlined in many
places, the one probe in the systemtap source might expand to many
probes in the generated module.


> but the other PC location
> being used to identify the frame can help you pick the right one
> automatically, just of the PCs for that source location just pick the one
> that is inside a block scope that contains the scope of the identified frame.

What other PC location?

-- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature


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