Hi,
I need to debug the native code and insert breakpoint.
The native code is based on PJSIP project and all the related libs are
assembled in libpjsipjni.so
When I running C/C++ debugger and try to insert breakpoint, this error
message will displayed and always shows when input "continue" command

(gdb)
Warning:
&"Warning:\n"
&"Cannot insert breakpoint 2.\n"
&"Error accessing memory address 0x47c58: Input/output error.\n"
&"\n"
174^error,msg="Warning:\
nCannot insert breakpoint 2.\nError accessing memory address 0x47c58:
Input/output error.\n"
(gdb)
Cannot insert breakpoint 2.
Error accessing memory address 0x47c58: Input/output error.

I have tryed to load the .so file and can see the result after "info
sharedlibrary" command
I don't know why the address cannot be accessed and cannot insert
breakpoint.
So thank you very much if you have any ideas to resolve this problem.

Here is more information:
(gdb)
153 info threads
&"info threads\n"
~"  14 Thread 21695  0x401066cc in ?? ()\n"
~"  13 Thread 21594  0x401066cc in ?? ()\n"
~"  12 Thread 21576  0x401066cc in ?? ()\n"
~"  11 Thread 21575  0x401066cc in ?? ()\n"
~"  10 Thread 21572  0x401057ac in toascii () from
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"  9 Thread 21571  0x401057ac in toascii () from
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"  8 Thread 21570  0x401066d0 in ?? ()\n"
~"  7 Thread 21569  0x401066cc in ?? ()\n"
~"  6 Thread 21568  0x401066cc in ?? ()\n"
~"  5 Thread 21567  0x401066cc in ?? ()\n"
~"  4 Thread 21566  0x401058d0 in unlink () from
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"  3 Thread 21564  0x40105fe8 in ?? ()\n"
~"  2 Thread 21561  0x401066cc in ?? ()\n"
~"  1 Thread 21560  0x40803c50 in ?? ()\n"
&"warning: Couldn't restore frame in current thread, at frame 0\n"
~"0x40803c50 in ?? ()\n"
153^done
(gdb)
154-data-list-register-names
154^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","f0","f1","f2","f3","f4","f5","f6","f7","fps","cpsr"]
(gdb)
155-break-insert
/root/gwj_workspace/VideoTalk_temp/jni/pjsip/jni/src/pjsua_wrap.cpp:8716
155^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00047c58",func="Java_org_pjsip_pjsua_pjsuaJNI_create",file="pjsip/build/..//jni/build/..//src//pjsua_wrap.cpp",fullname="/root/gwj_workspace/VideoTalk_temp/jni/pjsip/jni/src/pjsua_wrap.cpp",line="8716",times="0"}
(gdb)
156-stack-info-depth
156^done,depth="1"
(gdb)
157-stack-list-frames 0 1
157^done,stack=[frame={level="0",addr="0x40803c50",func="??"}]
(gdb)
158-exec-continue
158^running
(gdb)
Warning:
&"Warning:\n"
Cannot insert breakpoint 1.
&"Cannot insert breakpoint 1.\n"
Error accessing memory address 0x47c58: Input/output error.

&"Error accessing memory address 0x47c58: Input/output error.\n"
&"\n"
158^error,msg="Warning:\nCannot insert breakpoint 1.\nError accessing
memory address 0x47c58: Input/output error.\n"
(gdb)
159 info threads
&"info threads\n"
~"  14 Thread 21695  0x401066cc in ?? ()\n"
~"  13 Thread 21594  0x401066cc in ?? ()\n"
~"  12 Thread 21576  0x401066cc in ?? ()\n"
~"  11 Thread 21575  0x401066cc in ?? ()\n"
~"  10 Thread 21572  0x401057ac in toascii () from
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"  9 Thread 21571  0x401057ac in toascii () from
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"  8 Thread 21570  0x401066d0 in ?? ()\n"
~"  7 Thread 21569  0x401066cc in ?? ()\n"
~"  6 Thread 21568  0x401066cc in ?? ()\n"
~"  5 Thread 21567  0x401066cc in ?? ()\n"
~"  4 Thread 21566  0x401058d0 in unlink () from
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"  3 Thread 21564  0x40105fe8 in ?? ()\n"
~"  2 Thread 21561  0x401066cc in ?? ()\n"
~"  1 Thread 21560  0x40803c50 in ?? ()\n"
&"warning: Couldn't restore frame in current thread, at frame 0\n"
~"0x40803c50 in ?? ()\n"
159^done
(gdb)
160-stack-info-depth
160^done,depth="1"
(gdb)
161-stack-list-frames 0 1
161^done,stack=[frame={level="0",addr="0x40803c50",func="??"}]
(gdb)
162-data-list-changed-registers
162^done,changed-registers=["0","2","4","5","6","7","8","9","11","12","13","14","15","25"]
(gdb)
163 info sharedlibrary
&"info sharedlibrary\n"
~"From        To          Syms Read   Shared Object Library\n"
~"                        No          /system/bin/linker\n"
~"0x40101398  0x40105f24  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libc.so\n"
~"0x400ee5ec  0x400ee7b8  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libstdc++.so\n"
~"0x4014a67c  0x4014b464  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libm.so\n"
~"0x4002a31c  0x4002a3a8  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/liblog.so\n"
~"                        No          libcutils.so\n"
~"0x40002bdc  0x40003118  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libz.so\n"
~"                        No          libtime_genoff.so\n"
~"                        No          libutils.so\n"
~"                        No          libbinder.so\n"
~"                        No          libexpat.so\n"
~"                        No          libcrypto.so\n"
~"                        No          libgabi++.so\n"
~"                        No          libicuuc.so\n"
~"                        No          libicui18n.so\n"
~"                        No          libssl.so\n"
~"                        No          libstlport.so\n"
~"                        No          libnativehelper.so\n"
~"                        No          libnetutils.so\n"
~"                        No          libGLESv2_dbg.so\n"
~"0x40590830  0x40590b3c  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libEGL.so\n"
~"                        No          libwpa_client.so\n"
~"                        No          libhardware_legacy.so\n"
~"                        No          libpixelflinger.so\n"
~"                        No          libhardware.so\n"
~"                        No          libemoji.so\n"
~"                        No          libjpeg.so\n"
~"                        No          libskia.so\n"
~"                        No          libui.so\n"
~"0x40764df8  0x40765bcc  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libGLESv2.so\n"
~"                        No          libmemalloc.so\n"
~"                        No          libQcomUI.so\n"
~"                        No          libgui.so\n"
~"                        No          libcamera_client.so\n"
~"                        No          libsqlite.so\n"
~"                        No          libqc-opt.so\n"
~"                        No          libdvm.so\n"
~"0x4089e640  0x4089f8ec  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libGLESv1_CM.so\n"
~"                        No          libETC1.so\n"
~"                        No          libsonivox.so\n"
~"                        No          libstagefright_foundation.so\n"
~"                        No          libmedia.so\n"
~"                        No          libnfc_ndef.so\n"
~"                        No          libusbhost.so\n"
~"                        No          libharfbuzz.so\n"
~"                        No          libhwui.so\n"
~"                        No          libtilerenderer.so\n"
~"                        No          libbluetooth.so\n"
~"                        No          libbluedroid.so\n"
~"                        No          libdbus.so\n"
~"                        No          libandroid_runtime.so\n"
~"0x591a2070  0x591ad00c  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libavutil.so\n"
~"0x569475d8  0x56948898  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libavcore.so\n"
~"0x5ad766e0  0x5aded634  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libavcodec.so\n"
~"0x591b5ae0  0x591c3960  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libavformat.so\n"
~"0x598a2a20  0x598bdb24  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libswscale.so\n"
~"0x5aefd360  0x5b00b544  Yes
/root/gwj_workspace/VideoTalk_temp/libs/armeabi-v7a/libpjsipjni.so\n"
~"                        No          libgenlock.so\n"
~"                        No          gralloc.msm8660.so\n"
163^done
(gdb)
164-stack-list-arguments 0 0 0
164^done,stack-args=[frame={level="0",args=[]}]
(gdb)
165-stack-list-locals 0
165^done,locals=[]
(gdb)
167-break-disable 1
167^done
(gdb)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to