Mac configuration issues with the debug of Eclipse CDT (GO)

Source: Internet
Author: User

Issue 1: Appearance of Could not determine GDB version using Command:gdb--version

Reason:

There is a problem with GDB or GDB location configuration not installed on Mac

Workaround:

1 Installing GDB,

2 If you are sure that GDB is already installed, you need to configure the path to Debuger in Eclipse: Project Right-"Debug as-" Debug configurations-Left C + + application find current Project-" Right tab Select debuger-Modify GDB path and. gdbinit file path

Issue 2: Appearance of Could not determine GDB version using Command:gdb--version

[Plain] View Plain Copy

  1. Error in final launch sequence
  2. Failed to execute MI command:
  3. -exec-run
  4. Error Message from debugger back end:
  5. Unable to find Mach task port for Process-id 99177: (os/kern) Failure (0x5).
  6. (Please check that GDB is Codesigned-see taskgated (8))
  7. Unable to find Mach task port for Process-id 99177: (os/kern) Failure (0x5).
  8. (Please check that GDB is Codesigned-see taskgated (8))

Reason:

GDB has no signature

Workaround:

1 Concrete steps Reference:https://segmentfault.com/q/1010000004136334

2 If there is a problem with system certificate creation failure reference:http://blog.csdn.net/lllkey/article/details/79423596

Issue 3: Appearance of Could not determine GDB version using Command:gdb--version

[Plain] View Plain Copy

    1. Error in final launch sequence
    2. Failed to execute MI command:
    3. -exec-run
    4. Error Message from debugger back end:
    5. During startup program terminated with signal?, Unknown signal.
    6. During startup program terminated with signal?, Unknown signal.

Reason:

A problem that occurs after a version of Mac OSX, modifying the configuration of the. gdbinit file can be resolved

Workaround:

1 Reference:https://stackoverflow.com/questions/40052171/gdb-terminated-with-signal-unknown-signal

Create the file in the home directory or GDB directory:. Gdbinit (My gdb path is:/usr/local/cellar/gdb/8.1/bin), as long as you configure the appropriate path in eclipse

[Plain] View Plain Copy

    1. echo "Set Startup-with-shell off" >> ~/.gdbinit

Re-open a terminal or debug under Eclipse

Issue 4: Appearance of Could not determine GDB version using Command:gdb--version

[Plain] View Plain Copy

    1. error in final launch  sequence  
    2. failed to  execute mi command:  
    3. -EXEC-RUN  
    4. error message from debugger back  end:  
    5. during  Startup program terminated with signal sigtrap, trace/breakpoint trap.   
    6. during startup  program terminated with signal sigtrap, trace/breakpoint trap.  

Reason:

gdb8.1 version of certain issues that need to be reduced to a certain version, I am now trying to gdb8.0.1 is can be debugged

Workaround:

1 Reference:https://www.jianshu.com/p/b546a47b6b75

From this article, gdb8.1 does not match the current OS, so it needs to be rolled back to gdb8.0.1

The use of Brew to replace the version failed due to the need for

Brew versions GDB

But return:

Error:unknown command:versions

2 8.0.1:https://ftp.gnu.org/gnu/gdb/gdb-8.0.1.tar.xz

To start compiling and installing GDB:

Extract:

[Plain] View Plain Copy

    1. Tar-jxvf/users/lsq/movies/thunder/gdb-8.0.1.tar.xz

Compile and install:

[Plain] View Plain Copy

    1. ./configure--prefix=/usr/local
    2. Make
    3. Make-c gdb Install

Signature GDB:

[Plain] View Plain Copy

    1. Codesign-fs gdb_codesign $ (which gdb)

Configuration:

[Plain] View Plain Copy

    1. echo "Set Startup-with-shell off" >> ~/.gdbinit

If you are using Eclipse debugging: Modify the location of GDB and. Gdbinit in Debuger (refer to question 1)

Mac configuration issues with the debug of Eclipse CDT (GO)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.