简体   繁体   中英

Using gdb on macOS High Sierra 10.13.12

I'm getting this error when I try running a program using gdb .

(gdb) run
      Starting program: /Users/vp/personal/a.out 
      [New Thread 0x1803 of process 3676]
      [New Thread 0x1b03 of process 3676]
      During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.
     (gdb)

Anybody have any ideas regarding the message?

The reason for this on my system running on High Sierra was that the file .gdbinit was not found. I was using Eclipse C/C++ as a code editor. In the debug configuration under "Debugger" the path to the .gdbinit must be specified, eg /Users/john/.gdbinit . Then gdb with Eclipse works.

In addition the instructions for using gdb 8.0.1 must be used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM