libbpf-rs: Make func_name optional for uprobe attach#1096
Merged
danielocfb merged 2 commits intolibbpf:masterfrom Feb 26, 2025
Merged
libbpf-rs: Make func_name optional for uprobe attach#1096danielocfb merged 2 commits intolibbpf:masterfrom
danielocfb merged 2 commits intolibbpf:masterfrom
Conversation
d-e-s-o
reviewed
Feb 25, 2025
Collaborator
d-e-s-o
left a comment
There was a problem hiding this comment.
Seems fine for the most part, thanks! Would you mind adding a test for this functionality?
Change UprobeOpts::func_name to Option<String> so that user can attach uprobe to specifc offset in binary. This would be useful for target that have symbol stripped. Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
3d9589b to
e8087b0
Compare
Add a new test case test_object_uprobe_with_func_offset() to exercise the new functionality. Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
e21fc2e to
e918e86
Compare
danielocfb
approved these changes
Feb 26, 2025
Collaborator
danielocfb
left a comment
There was a problem hiding this comment.
Thanks for the test!
d-e-s-o
added a commit
to d-e-s-o/libbpf-rs
that referenced
this pull request
Feb 26, 2025
Add a CHANGELOG entry for pull request libbpf#1096, which adjusted the UprobeOpts::func_name member to be an Option. Also improve the documentation for the same slightly, by covering the None case. Signed-off-by: Daniel Müller <deso@posteo.net>
d-e-s-o
added a commit
that referenced
this pull request
Feb 26, 2025
Add a CHANGELOG entry for pull request #1096, which adjusted the UprobeOpts::func_name member to be an Option. Also improve the documentation for the same slightly, by covering the None case. Signed-off-by: Daniel Müller <deso@posteo.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change UprobeOpts::func_name to Option
so that user can attach uprobe to specifc offset in binary.
This would be useful for target that have symbol stripped.