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 example illustrating look up of mangled symbols #831

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

danielocfb
Copy link
Collaborator

Most symbol sources store mangled symbol names. Hence, the mangled name is what the Inspector::lookup facility matches against. However, that is not always desired. Rather, sometimes filtering needs happen based on the demangled name or other information encoded in the mangled symbol (such as number of function arguments).
We support this use case via the Inspector::for_each functionality, but it's not trivially obvious that this is possible to begin with. With this change we add an example that illustrates such usage.

Most symbol sources store mangled symbol names. Hence, the mangled name
is what the Inspector::lookup facility matches against. However, that is
not always desired. Rather, sometimes filtering needs happen based on
the demangled name or other information encoded in the mangled symbol
(such as number of function arguments).
We support this use case via the Inspector::for_each functionality, but
it's not trivially obvious that this is possible to begin with. With
this change we add an example that illustrates such usage.

Signed-off-by: Daniel Müller <[email protected]>
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.78%. Comparing base (91473b1) to head (b24fd57).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #831   +/-   ##
=======================================
  Coverage   94.78%   94.78%           
=======================================
  Files          52       52           
  Lines        9830     9830           
=======================================
  Hits         9317     9317           
  Misses        513      513           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielocfb danielocfb merged commit 29f28c4 into libbpf:main Sep 24, 2024
39 checks passed
@danielocfb danielocfb deleted the topic/inspect-demangle branch September 24, 2024 21:56
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

Successfully merging this pull request may close these issues.

2 participants