-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb] Remove support and workarounds for Android 4 and older #124047
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, you shouldn't need this with any current NDK (and current NDKs support API >= 21). looks like i added this in 2015 to support building gdb/gdbserver out of the box and didn't realize lldb was carrying a workaround: https://android-review.googlesource.com/c/platform/bionic/+/155038
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking around, i see a few others that aren't true either:
or
for example.
please let us know any time you find yourself needing to add a workaround like this, so we can try to make it "just work".
anything like
is exceptionally weird. any time you're having to include stuff from
<asm
(and to a lesser extent<linux/
) is probably a bug on our side.i don't suppose anyone knows the history of this?
that's especially weird because execve() doesn't use $PATH ... it's the members of the exec family that have a 'p' in the name that do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will circle back with another set of diffs to clean up some of these other things too. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ptrace header issue and the bits from ar.h header I'll submit. SUN_LEN was only added 6 years ago so I figure keep it for a little bit longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's just a macro in a header, so as long as you're building with an ndk that's less than 6 years old (and no supported ndk is more than 1 year old), "this is fine".
(the ndk has a "unified headers" model where we use clang availability annotations on functions so we can use the exact same headers regardless of what api level you're targeting. so any types/macros/etc "just work" even for OS releases where they weren't present.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at the bionic headers, getgrgid_r() wasn't available until API 24...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(getgrgid() has been around forever, though, so if anyone cared they could reduce the scope of this. but probably just
#if defined(__ANDROID__) && (__ANDROID_API__ >= 24)
is clearer, and groups aren't particularly meaningful on android anyway, so probably no-one cares in the meantime?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was wondering if with another diff it would make sense to check the Android API or a comment making it clear when it would make sense to remove. Either way..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, "if it confused you, it'll probably confuse the next person". either the comment or the more specific
#if
sgtm...