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

Support looking up functions as function pointers #188

Open
werat opened this issue Feb 19, 2022 · 0 comments
Open

Support looking up functions as function pointers #188

werat opened this issue Feb 19, 2022 · 0 comments

Comments

@werat
Copy link
Member

werat commented Feb 19, 2022

Assuming the program:

int main(int argc, char* argv[]) {
  return 0;
}

EvaluateExpression("main") should return an object holding a function pointer to main.

This can be implemented via SBTarget::FindFunctions(), which returns a list of SBSymbolContext items. Symbol context hold information about the function type and its address, so we can create an SBValue representing the function pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant