Home » Language IDEs » C / C++ IDE (CDT) » Problems with GDB with Eclipse for C/C++ on MacOS & Windows(GDB 9.1, MacOS 10.15 or Windows 10.1909, Eclipse 2020/06, CDT 9.11.1.202004040713)
Problems with GDB with Eclipse for C/C++ on MacOS & Windows [message #1826503] |
Sun, 26 April 2020 04:09 |
Sam Warner Messages: 40 Registered: April 2020 |
Member |
|
|
I found that >50% of the time when I attempt to debug, the system progress hangs. I'll keep debug as I have time.
When I hit the 'debug' button, the progress indicator will stall around 96%. The the debugger is started, and can be terminated or relaunched. Whether relaunched or using the 'debug' button, the % success is no better then 50% of the time. Once successful, the debugging session is 100% functional.
I've attached a list of the installed Eclipse components, a picture showing that I'm only using local debugging, and a picture showing the "debug" windows stalled and functioning processes.
Any suggestions on debugging further?
sw config
GDB 9.1, MacOS 10.15, Eclipse 2020/06, CDT 9.11.1.202004040713, Java 1.8.0_131-b11
[Updated on: Mon, 27 April 2020 04:41] Report message to a moderator
|
|
| | | | | | | | | | | | |
Re: Problems with GDB with Eclipse for C/C++ on MacOS & Windows [message #1829729 is a reply to message #1826503] |
Thu, 09 July 2020 15:34 |
Gordon Doughman Messages: 10 Registered: December 2018 |
Junior Member |
|
|
I'm having the same problem as Sam using Eclipse Version: 2020-06 (4.16.0), GDB version 9.2 and macOS 10.15.5 on a 2020 MacBook Air. Sometimes debugging works, sometime it doesn't. When it doesn't work, Eclipse just hangs at 96%. Unlike Sam, when Eclipse hangs, I get no entry in the Error Log view. But there is a difference in what appears in the Debugger Console. When debugging works, the following appears in the Debugger Console:
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "x86_64-apple-darwin19.5.0".
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".
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
[New Thread 0x2303 of process 4822]
[New Thread 0x2a03 of process 4822]
warning: unhandled dyld version (16)
Thread 2 hit Temporary breakpoint 1, main (argc=1, argv=0x7ffeefbff600) at ../Source/main.c:24
24 printf("\nELF2Hex v1.0.1, Copyright 2012 by MicroDialects\n\n");
When debugging doesn't work, the Debugger Console displays the following:
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "x86_64-apple-darwin19.5.0".
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".
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
[New Thread 0x1d03 of process 4949]
GDB is properly signed with the following entitlements:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
and .gdbinit contains the following:
set startup-with-shell off
I'm currently at a loss as to why this doesn't work all of the time. GDB was downloaded using MacPorts and I followed Thomas Vitale's guide (https://www.thomasvitale.com/how-to-setup-gdb-and-eclipse-to-debug-c-files-on-macos-sierra/) for setting up GDB in Catalina.
Any help in debugging this issue would be appreciated.
|
|
| | |
Goto Forum:
Current Time: Mon Oct 07 02:27:52 GMT 2024
Powered by FUDForum. Page generated in 0.05166 seconds
|