Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Symtab::getContainingModule(Offset) #1571

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

hainest
Copy link
Contributor

@hainest hainest commented Oct 10, 2023

Returns the module with PC ranges that contain a given offset (really address). By contrast, findModuleByOffset(Offset) finds a module starting at the given offset.

This is the correct replacement for Symtab::findModuleByOffset(std::set<Module *>&, Offset) removed in #1545.

Returns the module with PC ranges that contain a given offset (really
address). By contrast findModuleByOffset(Offset) finds a module
starting at the given offset.
@hainest hainest added enhancement code cleanup Bring the code up to modern standards or remove deprecated features Symtab This issue is directly related to SymtabAPI labels Oct 10, 2023
@hainest hainest requested a review from kupsch October 10, 2023 17:26
@hainest hainest self-assigned this Oct 10, 2023
Copy link
Contributor

@kupsch kupsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might add to the documentation that the default module is never returned even though it covers the entire range of the symtab object.

@hainest
Copy link
Contributor Author

hainest commented Oct 10, 2023

You might add to the documentation that the default module is never returned even though it covers the entire range of the symtab object.

The default module will be returned if and only if it is the only module. I'll update the docs to explicitly mention that.

@hainest hainest merged commit ddd2315 into master Oct 10, 2023
@hainest hainest deleted the thaines/add_symtab_getContainingModule branch October 10, 2023 20:37
jmellorcrummey pushed a commit to HPCToolkit/hpctoolkit that referenced this pull request Oct 23, 2023
for finding the Module that contains a given address.

This was a hard switch in Dyninst (no overlap), so add a configure
test for which method exists in dyninst.

This MR supersedes !940 for adapting hpcstruct to the new Dyninst.

See also:
dyninst/dyninst#1545
dyninst/dyninst#1571
bbiiggppiigg pushed a commit that referenced this pull request Feb 12, 2024
* Add Symtab::getContainingModule(Offset)

Returns the module with PC ranges that contain a given offset (really
address). In contrast, findModuleByOffset(Offset) finds a module
starting at the given offset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Bring the code up to modern standards or remove deprecated features enhancement Symtab This issue is directly related to SymtabAPI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants