一个.so文件的objdump的?需要帮助来了解消息 [英] objdump of a .so file? need help to understand the messages

查看:128
本文介绍了一个.so文件的objdump的?需要帮助来了解消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发相关的流,我面对我的C模块的一些问题,本机应用程序...和我有什么是logcat的一些消息

I am developing a native application related to streaming, i am facing some problems in my c module... and what i have is some message from Logcat

下面是logcat的消息

Here is the Logcat message

INFO/DEBUG(28): Build fingerprint: 'generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys'
11-17 12:40:07.550: INFO/DEBUG(28): pid: 5957, tid: 5957  >>> com.mmstwo <<<
11-17 12:40:07.561: INFO/DEBUG(28): signal 11 (SIGSEGV), fault addr deadd00d
11-17 12:40:07.561: INFO/DEBUG(28):  r0 00000354  r1 00129100  r2 0000000c  r3 deadd00d
11-17 12:40:07.561: INFO/DEBUG(28):  r4 00000026  r5 ad07ff50  r6 00000000  r7 fffe72f8
11-17 12:40:07.579: INFO/DEBUG(28):  r8 afe3bdfc  r9 4509f020  10 00000000  fp 00135a40
11-17 12:40:07.590: INFO/DEBUG(28):  ip ad080160  sp bef28f90  lr afe14cf7  pc ad035452  cpsr 20000030
11-17 12:40:07.840: INFO/DEBUG(28):          #00  pc 00035452  /system/lib/libdvm.so
11-17 12:40:07.850: INFO/DEBUG(28):          #01  pc 00027a98  /system/lib/libdvm.so
11-17 12:40:07.869: INFO/DEBUG(28):          #02  pc 00027bba  /system/lib/libdvm.so
11-17 12:40:07.879: INFO/DEBUG(28):          #03  pc 0002d98e  /system/lib/libdvm.so


11-17 12:40:07.901: INFO/DEBUG(28):          #04  pc 0000142e  /data/data/com.mmstwo/lib/libnstreamer.so

这是重新$ P $行psents我使用C类。

this is the line that represents the c class which i use.

根据意见对<一个href=\"http://stackoverflow.com/questions/4171259/problem-in-my-appliction-cant-understand-what-does-the-error-message-says\">my previous问题我后面拉胡尔定的url和倾倒我的.so文件到一个文本文件中。

as per comments on my previous question i followed url given by rahul and dumped my .so file to a text file.

下面是该文本文件

 141e:  4a2d        ldr r2, [pc, #180]  (14d4 <Java_com_mmstwo_NativeParser_stringFromJNI+0x408>)
    1420:   4b2d        ldr r3, [pc, #180]  (14d8 <Java_com_mmstwo_NativeParser_stringFromJNI+0x40c>)
    1422:   2184        movs    r1, #132
    1424:   5846        ldr r6, [r0, r1]
    1426:   18aa        adds    r2, r5, r2
    1428:   18eb        adds    r3, r5, r3
    142a:   4651        mov r1, sl
    142c:   1c38        adds    r0, r7, #0
    142e:   47b0        blx r6
    1430:   4b2a        ldr r3, [pc, #168]  (14dc <Java_com_mmstwo_NativeParser_stringFromJNI+0x410>)
    1432:   4669        mov r1, sp

根据这样的<一个href=\"http://groups.google.com/group/android-ndk/browse_thread/thread/cce1848b309ed56c/5679f82418283f26?pli=1\">post在并专门由尼克拉斯Ansman建议谷歌I组中表现出来的片段是在我需要的行 142E

so as per the post in google groups and specially suggested by Nicklas Ansman i had shown the snippet which is around my desired line 142e.

现在可以在这里的人,谁可以告诉什么呢 47b0 BLX R6 意味着什么?

Now can anyone here who can tell what does 47b0 blx r6 means?

我所了解的是它的东西用汇编语言编写,我不知道。所以,我需要你的理解的在线帮助。

What i knew is it is something written in assembly language that i don't know. So I need your help in understanding that line.

在此先感谢

推荐答案

BLX 跳转到由参数给出的地址;在这里,以当前装载寄存器R6的地址。此外,返回地址( LDR 运算code这是后设的即地址 BLX )写在专用寄存器LR(以下简称链接寄存器)。

blx jumps to the address given by the argument; here, to the address which is currently loaded in register r6. Also, the return address (namely the address of the ldr opcode which is located immediately after the blx) is written in the special-purpose register lr (as "link register").

这相当于间接调用。在C语言中它看起来像通过函数指针调用。在一些平台上与动态链接,一个简单的函数调用的函数也可以成为像你在这里看到的东西。

This corresponds to an indirect call. In C it would look like a call through a function pointer. on some platforms with dynamic linking, a simple function call to a function can also become something like what you see here.

反正寄存器转储显示r6至0在这一点上,因此段错误。 R6是从加载LDR 运算code上的地址1424这从什么地址R0,R1 + R6加载,R1是正上方设置为132。 R0是第一个参数到C函数常规寄存器。

Anyway, the register dump shows r6 to be 0 at that point, hence the segfault. r6 was loaded from the ldr opcode on address 1424. This loads r6 from what was at address r0+r1, r1 being set to 132 just above. r0 is the conventional register for the first argument to a C function.

这篇关于一个.so文件的objdump的?需要帮助来了解消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆