libjingle_peerconnection_so.so is no symbols

188 views
Skip to first unread message

오명섭

unread,
May 30, 2016, 11:10:53 AM5/30/16
to discuss-webrtc
I wanted to print call stack.
So, I ported stacktrace to apprtc in android.
I printed all addresss of call stack. but don't have funtion name such as symbol.
I fonud below so file don't have a symbol table.
    /out/Debug/AppRTCDemo/libs/armeabi-v7a/libjingle_peerconnection_so.so
I look forward to know the setting of having symbol tables.

phog...@webrtc.org

unread,
May 31, 2016, 9:00:11 AM5/31/16
to discuss-webrtc
Hi!

If you build in the out/Debug configuration you will build with -g, which should give you symbols in the logcat whenever there is a crash. If you build with release and get an unsymbolized stack trace from that, you need to re-symbolize it using a symbolized binary at the same revision and the ndk-stack tool.

I'll try it myself to be sure but it should work by default if you build debug.

/ P

phog...@webrtc.org

unread,
May 31, 2016, 10:03:43 AM5/31/16
to discuss-webrtc
Hi again!

I tried building 

ninja -C out/Debug AppRTCDemo 

(my GYP_DEFINES are OS=android target_arch=arm64), hacked a deliberate crash into webrtc/java/jni/peerconnection_jni.cc, (int* p = 0; printf("%d", *p;) and tried running a call in AppRTC. The app crashes like I expected and I get the following nice, clean stack trace in the logcat:

05-31 15:57:33.109  4070  4070 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-31 15:57:33.110  4070  4070 F DEBUG   : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MTC19T/2741993:user/release-keys'
05-31 15:57:33.110  4070  4070 F DEBUG   : Revision: 'rev_1.0'
05-31 15:57:33.111  4070  4070 F DEBUG   : ABI: 'arm64'
05-31 15:57:33.111  4070  4070 F DEBUG   : pid: 29156, tid: 29246, name: pool-2-thread-1  >>> org.appspot.apprtc <<<
05-31 15:57:33.112  4070  4070 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-31 15:57:33.132  4070  4070 F DEBUG   :     x0   0000000000000000  x1   0000007f91ff9b98  x2   0000000000000043  x3   0000007faa20d140
05-31 15:57:33.133  4070  4070 F DEBUG   :     x4   0000000000430000  x5   0000007fad5cb2e0  x6   0000000000000000  x7   0000000000430000
05-31 15:57:33.133  4070  4070 F DEBUG   :     x8   0000000000000000  x9   0000007faa1fa000  x10  0000007faa1fc9a8  x11  0000000000000035
05-31 15:57:33.134  4070  4070 F DEBUG   :     x12  0000000000000001  x13  dd6e76d1a9ead6ed  x14  0000000000000002  x15  0000000000000000
05-31 15:57:33.134  4070  4070 F DEBUG   :     x16  dd6e76d1a9ead6ed  x17  0000007fad5537e0  x18  0000000000000000  x19  0000000012da95c0
05-31 15:57:33.135  4070  4070 F DEBUG   :     x20  0000007fa9ce74e0  x21  0000007f95383e00  x22  0000000012da95c0  x23  0000000012df0100
05-31 15:57:33.135  4070  4070 F DEBUG   :     x24  00000000717e6a30  x25  0000000012cdbf80  x26  0000000000000010  x27  0000000012df0100
05-31 15:57:33.136  4070  4070 F DEBUG   :     x28  0000007f9280fdc0  x29  0000007f91ff9d40  x30  0000007f92daad50
05-31 15:57:33.136  4070  4070 F DEBUG   :     sp   0000007f91ff9d40  pc   0000007f92daad54  pstate 0000000020000000
05-31 15:57:33.148  4070  4070 F DEBUG   : 
05-31 15:57:33.148  4070  4070 F DEBUG   : backtrace:
05-31 15:57:33.148  4070  4070 F DEBUG   :     #00 pc 000000000010fd54  /data/app/org.appspot.apprtc-1/lib/arm64/libjingle_peerconnection_so.so (Java_org_webrtc_PeerConnectionFactory_initializeAndroidGlobals+40)
05-31 15:57:33.149  4070  4070 F DEBUG   :     #01 pc 000000000025323c  /data/app/org.appspot.apprtc-1/oat/arm64/base.odex (offset 0x195000) (boolean org.webrtc.PeerConnectionFactory.initializeAndroidGlobals(java.lang.Object, boolean, boolean, boolean)+176)
05-31 15:57:33.150  4070  4070 F DEBUG   :     #02 pc 00000000001d72b4  /data/app/org.appspot.apprtc-1/oat/arm64/base.odex (offset 0x195000) (void org.appspot.apprtc.PeerConnectionClient.createPeerConnectionFactoryInternal(android.content.Context)+2744)
05-31 15:57:33.150  4070  4070 F DEBUG   :     #03 pc 00000000001d3980  /data/app/org.appspot.apprtc-1/oat/arm64/base.odex (offset 0x195000) (void org.appspot.apprtc.PeerConnectionClient.access$200(org.appspot.apprtc.PeerConnectionClient, android.content.Context)+68)
05-31 15:57:33.151  4070  4070 F DEBUG   :     #04 pc 00000000001cf180  /data/app/org.appspot.apprtc-1/oat/arm64/base.odex (offset 0x195000) (void org.appspot.apprtc.PeerConnectionClient$1.run()+116)
05-31 15:57:33.151  4070  4070 F DEBUG   :     #05 pc 0000000073eba3d0  /data/dalvik-cache/arm64/system@framework@boot.oat (offset 0x1ede000)

That one has symbols as you can see. It doesn't have line numbers unfortunately, but it's at least easier than naked function addresses :)

Please post more details on how you built and how you concluded there are no symbols.

/ P
Reply all
Reply to author
Forward
0 new messages