小编gig*_*sai的帖子

lldb python错误

我尝试lldb在我的Mac上运行并在启动时获取此信息:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/embedded_interpreter.py", line 1, in <module>
    import readline
ImportError: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in …
Run Code Online (Sandbox Code Playgroud)

macos lldb

13
推荐指数
1
解决办法
3404
查看次数

iOS ARM:为什么不从main()调用除法例程?

我正在学习Mach-O符号化过程是如何工作的,我写了一个简单的C程序来测试一些假设.我有以下C代码:

#include <stdio.h>
#include <stdlib.h>

int division(int a, int b);

int m;

int main(void)
{
    int i,j;

    printf("initializing i\n");
    i = 10;

    printf("initializing j\n");
    j=1;

    printf("i = %d, j = %d\n", i, j);
    m = division(i, j);

    printf("m = %d / %d = %d\n", i, j, m);

    return 0;
}

int division(int a, int b)
{
    return a / b;
}
Run Code Online (Sandbox Code Playgroud)

它编译使用

clang -Os -Wimplicit -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/ -arch armv7 -o helloworld helloworld.c

到以下ARM iOS程序集:

   EXPORT _main
__text:0000BEFC _main
__text:0000BEFC                 PUSH …
Run Code Online (Sandbox Code Playgroud)

c assembly arm ios

1
推荐指数
1
解决办法
210
查看次数

标签 统计

arm ×1

assembly ×1

c ×1

ios ×1

lldb ×1

macos ×1