gdb 初次运行卡住 Starting program: [New Thread 0x1103 of process 843]

安装完后gdb一般会有提示:

==> gdb
gdb requires special privileges to access Mach ports.
You will need to codesign the binary. For instructions, see:

  https://sourceware.org/gdb/wiki/BuildingOnDarwin

On 10.12 (Sierra) or later with SIP, you need to run this:

  echo "set startup-with-shell off" >> ~/.gdbinit

安装完gdb后应该代码签名。

然后在 10.12 (Sierra) or later with SIP(系统集成保护),需要:

:echo "set startup-with-shell off" >> ~/.gdbinit
~/power/bin # gdb netmgr GNU gdb (GDB) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-unknown-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from netmgr...done. (gdb) r Starting program: /root/power/bin/netmgr [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Signal is about to be caught. Preparing to handle it... route: SIOCDELRT: No such process route: SIOCDELRT: No such process killall: udhcpc: no process killed killall: udhcpc: no process killed [New Thread 0xb583d400 (LWP 424)] [New Thread 0xb4eff400 (LWP 430)] [New Thread 0xb46fe400 (LWP 431)] Thread 1 "netmgr" received signal SIGSEGV, Segmentation fault. 0xb6a97d24 in memcpy () from /lib/libc.so.6 (gdb) bt #0 0xb6a97d24 in memcpy () from /lib/libc.so.6 #1 0xb6b82028 in zte_memcpy_s () from /root/power/lib/libzte_slibc.so #2 0x0002ce9c in __frame_dummy_init_array_entry () Backtrace stopped: previous frame identical to this frame (corrupt stack?) 如何定位到段错误的代码行数
最新发布
04-02
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值