debug 问题

Posted guohaoyu110

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了debug 问题相关的知识,希望对你有一定的参考价值。

If you are getting this in gdb on macOS while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)
  • Identity type: Self Signed Root
  • Certificate type: Code Signing
  • Check: let me override defaults
  1. Continue until "specify a location for..."
  2. Set Keychain location to System
  3. Create certificate and close Certificate Assistant.
  4. Find certificate in System keychain.
  5. Double click certificate
  6. Expand Trust, set Code signing to always trust
  7. Restart taskgated in terminal: killall taskgated
  8. Codesign gdb using your certificate: codesign -fs gdbc /usr/local/bin/gdb
  9. Shut down your mac and restart in recovery mode (hold down command-R until apple logo appears)
  10. Open terminal window
  11. Modify System Integrity Protection to allow debugging: csrutil enable --without debug
  12. Reboot your Mac. Debugging with gdb should now work as expected.

以上是关于debug 问题的主要内容,如果未能解决你的问题,请参考以下文章

调试,高级--step into my code ,只调试自己写的代码,shux,各种step操作debug

Xcode8:"subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0" 的警告(代码片段

App性能:TraceView分析法

__FUNCTION__, __LINE__ 有助于debug的宏定义

VS2015编译GEOS的debug和release版本

数据框架到RDD这段代码无法工作。