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

Deprecate Symtab::getOrCreateModule #1623

Merged
merged 6 commits into from Nov 7, 2023

Conversation

hainest
Copy link
Contributor

@hainest hainest commented Nov 7, 2023

There are several problems here:

  1. Users shouldn't be creating modules

  2. When created, the returned module must be "fixed up" before it's
    useful. There's no need for that when one could be properly constructed
    at the callsite inside Dyninst.

  3. It violates the Single Responsibility Principle

@hainest hainest added Symtab This issue is directly related to SymtabAPI API-BREAKER This change breaks the public API labels Nov 7, 2023
@hainest hainest requested a review from kupsch November 7, 2023 18:07
@hainest hainest self-assigned this Nov 7, 2023
@hainest hainest force-pushed the thaines/deprecate_symtab_getOrCreateModule branch from 1e09fe5 to fe35179 Compare November 7, 2023 18:55
@hainest
Copy link
Contributor Author

hainest commented Nov 7, 2023

This trips clang's -Winconsistent-missing-override. Let me go fix that first.

There are several problems here:

1) Users shouldn't be creating modules

2) When created, the returned module must be "fixed up" before it's
useful. There's no need for that when one could be properly constructed
at the callsite inside Dyninst.

3) It violates the Single Responsibility Principle
It's private, so can only be used by friends- specifically Object.
The address ranges have already been inserted there by 'addModule'.
@hainest hainest force-pushed the thaines/deprecate_symtab_getOrCreateModule branch from fe35179 to 81e3e7a Compare November 7, 2023 20:20
@hainest hainest merged commit 4039188 into master Nov 7, 2023
3 checks passed
@hainest hainest deleted the thaines/deprecate_symtab_getOrCreateModule branch November 7, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API-BREAKER This change breaks the public API Symtab This issue is directly related to SymtabAPI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants