-
Notifications
You must be signed in to change notification settings - Fork 264
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
import itertools ImportError: dlopen(/Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/lib/python2.7/lib-dynload/itertools.so #1173
Comments
The testing system: MacBook Pro, macOS 10.15.2. Could you reproduce it? |
(i see the same on 10.14 if i run |
I want to use GEF in GDB to debug the app, if this issue won't be fixed, I cannot use GEF in GDB. |
@hhb have you had a chance to look at this? Any idea what it will take to fix it? |
I compile the gdb 8.3 source code from google android by myself, and set target aarch64-linux-android, built with python3, it works well with GEF-gdb |
I'm still trying to figure out what's happening. _PyBool_Type is defined in libpython2.7.a. libpython is statically linked into gdb binary. But gdb doesn't export any symbol. Linking flag issue? It is also interesting that this didn't cause any problem on other platforms. |
The unstripped binary does have PyBool_Type. Maybe we should not strip it. |
IIRC there's a flag to choose specific symbols to avoid stripping. I would assume that if it needs to continue exporting "unused" symbols there's probably a version script that goes with it? |
|
Bug: android/ndk#1173 Change-Id: I1748371baf4aea5952436864b9d217e668d856d4
Oops forgot this part in aosp/1254254 Bug: android/ndk#1173 Change-Id: Ibe13a536d6dc5a2c827f48e78ffb3839d6b7edba
Fix is in build 6352462 on https://ci.android.com/builds/branches/aosp-ndk-release-r21/grid? |
Hi, I was trying to debug .so in an app with gdb, I encountered the following error.
k3vin@Kais-MacBook-Pro bin % ./gdb
Traceback (most recent call last):
File "/Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/share/gdb/python/gdb/init.py", line 143, in auto_load_packages
import(modname)
File "/Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/share/gdb/python/gdb/command/frame_filters.py", line 22, in
from gdb.FrameIterator import FrameIterator
File "/Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/share/gdb/python/gdb/FrameIterator.py", line 17, in
import itertools
ImportError: dlopen(/Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/lib/python2.7/lib-dynload/itertools.so, 2): Symbol not found: _PyBool_Type
Referenced from: /Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/lib/python2.7/lib-dynload/itertools.so
Expected in: flat namespace
in /Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/lib/python2.7/lib-dynload/itertools.so
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin14.5.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
GDB is located at /Users/k3vin/Library/Android/sdk/ndk/21.0.6113669/prebuilt/darwin-x86_64/bin
How to fix the error? Thanks!
The text was updated successfully, but these errors were encountered: