我按照这篇文章打印堆栈跟踪如何在我的gcc C++应用程序崩溃时生成堆栈跟踪.它在x86 linux中运行良好.任何人都可以教我如何使它在arm-linux上运行?
我正在使用arm-linux-gcc 4.4.3.
[root@FriendlyARM /]# ./test1
Error: signal 11:
[0x0]
Run Code Online (Sandbox Code Playgroud)
在x86中
mickey@mickeyvm:~/Desktop/workspace/test/testCatchSeg/src$ ./test1
Error: signal 11:
./test1(_Z7handleri+0x19)[0x804876d]
[0xedd400]
./test1(_Z3bazv+0x10)[0x80487c2]
./test1(_Z3barv+0xb)[0x80487e1]
./test1(_Z3foov+0xb)[0x80487ee]
./test1(main+0x22)[0x8048812]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x84de37]
./test1[0x80486c1]
Run Code Online (Sandbox Code Playgroud)
这就是我为arm-linux编译的方法
arm-linux-g++ -g -rdynamic ./testCatchSeg.cpp -o testCatchSeg
Run Code Online (Sandbox Code Playgroud)