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

c++stl_shared.so comes without symbols #749

Closed
dryganets opened this issue Jul 19, 2018 · 7 comments
Closed

c++stl_shared.so comes without symbols #749

dryganets opened this issue Jul 19, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@dryganets
Copy link

Description

While gnu STL library comes unstripped the c++stl_shared.so comes without debugging symbols.
As you are going to deprecate gnu STL soon it will be handy to have a debugging information for the recommended library.

@DanAlbert DanAlbert self-assigned this Jul 19, 2018
@DanAlbert
Copy link
Member

We'll need to check and make sure that our various build system's will strip the library before packaging it in the APK, but as long as that happens this sounds like a good idea. (Woe be to anyone that has to debug libc++, but it should at least be possible.)

@DanAlbert DanAlbert added this to the r18 milestone Jul 19, 2018
@dryganets
Copy link
Author

dryganets commented Jul 28, 2018

I figured out the problem without symbols. One of the modules in my project was linked with c++shared instead of gnustl.
As result, an exception was thrown by c++shared and handled by gnustl stack hence undefined behavior and stack trace in c++lib only.

If I'd had symbols, it would save me some time.

@DanAlbert
Copy link
Member

Looks like gradle will strip prebuilt libraries before installing them in your APK, so this is doable.

@dryganets
Copy link
Author

Thank you for fixing it!

@DanAlbert DanAlbert reopened this Aug 9, 2018
@DanAlbert
Copy link
Member

(keeping the bug open until the change is merged into the r18 branch)

@DanAlbert
Copy link
Member

Okay, merged into r18 now.

mehulagg pushed a commit to mehulagg/superproject that referenced this issue Dec 21, 2019
* Update ndk from branch 'master'
  to dd0f579a20d0eac7900bd8bdbe0d875d61dcbf3e
  - Merge changes from topic "libcxx-debug"
    
    * changes:
      Mention libc++ not being stripped in the changelog.
      Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
  - Mention libc++ not being stripped in the changelog.
    
    Test: None
    Bug: android/ndk#749
    Change-Id: Id8440efbdadacc43f566577d7cafc0e61cec2595
    
  - Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
    These arguments allow the user to specify how their binaries should
    be stripped. APP_STRIP_MODE indicated what to do if LOCAL_STRIP_MODE
    is not set. LOCAL_STRIP_MODE always overrides APP_STRIP_MODE.
    
    The value of this argument is passed directly to the strip command, so
    valid values include anything accepted by strip, but commonly will be
    --strip-debug or --strip-unneeded.
    
    A special value may be used to indicated that the binary should not
    be stripped at all: none. This is helpful for users that want to
    preserve even debug info, perhaps during debugging or to delegate the
    stripping behavior to their packaging system (Studio does this).
    
    Test: ./run_tests.py --filter strip*
    Bug: android/ndk#749
    Change-Id: Ia0748cb7b9b92bcbc164f5156a6ad0e523314be2
mehulagg pushed a commit to mehulagg/superproject that referenced this issue Dec 21, 2019
* Update external/libcxx from branch 'ndk'
  to 5dcd3bb23cac63b76acd24bd26f5b9c0dd31e03a
  - Don't strip libc++_shared.so.
    
    This will get stripped by gradle before it is included in the user's
    APK. Having a non-stripped version in the NDK allows user to debug
    libc++ issues, should they be so unfortunate.
    
    Test: ndk/checkbuild.py libc++ && file path/to/libc++_shared.so
    Test: Use this NDK in Studio for a CMake project using c++_shared,
        check that the APK has a stripped libc++_shared.so.
    Bug: android/ndk#749
    
    Change-Id: Ifd6972d84c3eceba8dd14f0360033b0516445299
    

* Update ndk from branch 'master'
  to dd0f579a20d0eac7900bd8bdbe0d875d61dcbf3e
  - Merge changes from topic "libcxx-debug"
    
    * changes:
      Mention libc++ not being stripped in the changelog.
      Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
  - Mention libc++ not being stripped in the changelog.
    
    Test: None
    Bug: android/ndk#749
    Change-Id: Id8440efbdadacc43f566577d7cafc0e61cec2595
    
  - Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
    These arguments allow the user to specify how their binaries should
    be stripped. APP_STRIP_MODE indicated what to do if LOCAL_STRIP_MODE
    is not set. LOCAL_STRIP_MODE always overrides APP_STRIP_MODE.
    
    The value of this argument is passed directly to the strip command, so
    valid values include anything accepted by strip, but commonly will be
    --strip-debug or --strip-unneeded.
    
    A special value may be used to indicated that the binary should not
    be stripped at all: none. This is helpful for users that want to
    preserve even debug info, perhaps during debugging or to delegate the
    stripping behavior to their packaging system (Studio does this).
    
    Test: ./run_tests.py --filter strip*
    Bug: android/ndk#749
    Change-Id: Ia0748cb7b9b92bcbc164f5156a6ad0e523314be2
mehulagg pushed a commit to mehulagg/superproject that referenced this issue Dec 21, 2019
* Update ndk from branch 'master'
  to dd0f579a20d0eac7900bd8bdbe0d875d61dcbf3e
  - Merge changes from topic "libcxx-debug"
    
    * changes:
      Mention libc++ not being stripped in the changelog.
      Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
  - Mention libc++ not being stripped in the changelog.
    
    Test: None
    Bug: android/ndk#749
    Change-Id: Id8440efbdadacc43f566577d7cafc0e61cec2595
    
  - Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
    These arguments allow the user to specify how their binaries should
    be stripped. APP_STRIP_MODE indicated what to do if LOCAL_STRIP_MODE
    is not set. LOCAL_STRIP_MODE always overrides APP_STRIP_MODE.
    
    The value of this argument is passed directly to the strip command, so
    valid values include anything accepted by strip, but commonly will be
    --strip-debug or --strip-unneeded.
    
    A special value may be used to indicated that the binary should not
    be stripped at all: none. This is helpful for users that want to
    preserve even debug info, perhaps during debugging or to delegate the
    stripping behavior to their packaging system (Studio does this).
    
    Test: ./run_tests.py --filter strip*
    Bug: android/ndk#749
    Change-Id: Ia0748cb7b9b92bcbc164f5156a6ad0e523314be2
mehulagg pushed a commit to mehulagg/superproject that referenced this issue Dec 21, 2019
* Update external/libcxx from branch 'ndk-release-r18'
  to 7c8e44219bada108a2b6fba226f3f8edd221e52d
  - Don't strip libc++_shared.so.
    
    This will get stripped by gradle before it is included in the user's
    APK. Having a non-stripped version in the NDK allows user to debug
    libc++ issues, should they be so unfortunate.
    
    Test: ndk/checkbuild.py libc++ && file path/to/libc++_shared.so
    Test: Use this NDK in Studio for a CMake project using c++_shared,
        check that the APK has a stripped libc++_shared.so.
    Bug: android/ndk#749
    
    Change-Id: Ifd6972d84c3eceba8dd14f0360033b0516445299
    (cherry picked from commit 5dcd3bb23cac63b76acd24bd26f5b9c0dd31e03a)
    

* Update ndk from branch 'ndk-release-r18'
  to 6f01e311e7259777713e28a658e0651e627a865c
  - Merge changes from topic "cp" into ndk-release-r18
    
    * changes:
      Mention libc++ not being stripped in the changelog.
      Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
  - Mention libc++ not being stripped in the changelog.
    
    Test: None
    Bug: android/ndk#749
    Change-Id: Id8440efbdadacc43f566577d7cafc0e61cec2595
    (cherry picked from commit 358224e324c414fd30786a36996db0b0ef4bd059)
    
  - Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
    
    These arguments allow the user to specify how their binaries should
    be stripped. APP_STRIP_MODE indicated what to do if LOCAL_STRIP_MODE
    is not set. LOCAL_STRIP_MODE always overrides APP_STRIP_MODE.
    
    The value of this argument is passed directly to the strip command, so
    valid values include anything accepted by strip, but commonly will be
    --strip-debug or --strip-unneeded.
    
    A special value may be used to indicated that the binary should not
    be stripped at all: none. This is helpful for users that want to
    preserve even debug info, perhaps during debugging or to delegate the
    stripping behavior to their packaging system (Studio does this).
    
    Test: ./run_tests.py --filter strip*
    Bug: android/ndk#749
    Change-Id: Ia0748cb7b9b92bcbc164f5156a6ad0e523314be2
    (cherry picked from commit 08254da081bc6a07c6272d35812dc4936e5c29ab)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants