Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » MAC OSX ECLIPSE C/C++ Debugger does not seem to stop at breakpoint(Eclipse 20.12, MAC OSX BigSur 11.1)
MAC OSX ECLIPSE C/C++ Debugger does not seem to stop at breakpoint [message #1837923] Wed, 10 February 2021 16:30 Go to next message
G Gad is currently offline G GadFriend
Messages: 1
Registered: February 2021
Junior Member
Hello

A new user to ECLIPSE on MAC OSX is here.
I cannot figure out what is wrong in using gdb with Eclipse.
The gdb debugger does not appear to be stopping at any breakpoint. It appears as if the execution has stalled.
All debug buttons ("Step Over", "Step Into") are deactivated/disabled.


-----------

I am showing the issue through a "Hello World" example: Created by
File->New->Project-> C/C++ project-> A CMake Project with a Hello World Executable to get started->test-hello-world-> finish

The project builds perfectly.

Debug Configuration is shown in the attached screenshot.

After that, using

Run->Debug History->test-debug-hello-world

leads to nothing.

My console shows the message

Building in: /Users/egad/eclipse-workspace/test-hello-world/build/cmake.debug.macosx.x86_64
cmake --build . --target all
[100%] Built target test-hello-world
Build complete (0 errors, 0 warnings): /Users/egad/eclipse-workspace/test-hello-world/build/cmake.debug.macosx.x86_64
------------------------------------------------------------------
An update

I found what could be the reason. It has to do with gdb 10.1.
The word is that this error could be a result of bug (link is here).
This bug causes gdb 10.1 to crash. The message of the gdb crash is identical to the message produced by eclipse on the Debugger Console, which I include at the bottom.
I have tried the same bug reproducing scenario (here) on gdb 8.1 on my LINUX VM.
There was no crash with gdb 8.1.

Alas, I cannot go back to gdb 8.1 on my MAC OSX, since I upgraded with the Mac Ports, which would not let me to downgrade, or apparently not easily without breaking something else.
It looks that I will have to wait until GNU wakes a new version of gdb to fix this bus.



------------------
Output on "Debugger Console" from Eclipse
------------------
GNU gdb (GDB) 10.1
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-darwin20.1.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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".
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_gdb/gdb/work/gdb-10.1/gdb/thread.c:95: internal-error: struct thread_info *inferior_thread(): Assertion `current_thread_ != nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]

This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_gdb/gdb/work/gdb-10.1/gdb/thread.c:95: internal-error: struct thread_info *inferior_thread(): Assertion `current_thread_ != nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]












[Updated on: Thu, 11 February 2021 16:48]

Report message to a moderator

Re: MAC OSX ECLIPSE C/C++ Debugger does not seem to stop at breakpoint [message #1838903 is a reply to message #1837923] Mon, 08 March 2021 23:58 Go to previous messageGo to next message
Fifo Phonics is currently offline Fifo PhonicsFriend
Messages: 2
Registered: March 2021
Junior Member
Also a new MacOS user having similar issues and looking for any advice.

Hello World program compiles and runs without issues, and I can see from console it is being compiled with debug symbols.

I can also run debug interactively the project-built binary using gdb (10.1) at the command line. This proves out (I hope) that I correctly brew installed, and subsequently code signed gdb, without issues.

I know that the debug configuration is pointed at the right gdb file as the 'Debug' option will error if I say change its name to gdb-not, and will not give an error when I revert.

I do not however know how to get further details in the console. When I add an 'echo' command to my ~/.pdbinit it seems to be being ignored.
Re: MAC OSX ECLIPSE C/C++ Debugger does not seem to stop at breakpoint [message #1838906 is a reply to message #1838903] Tue, 09 March 2021 02:05 Go to previous message
Fifo Phonics is currently offline Fifo PhonicsFriend
Messages: 2
Registered: March 2021
Junior Member
Downgrade to an earlier gdb version fixed the problem as described here: https://stackoverflow.com/questions/65867339/im-currently-experiencing-an-error-with-gdb-debugging-on-eclipse-macos-big-sur/66539786#66539786
Previous Topic:Cannot locate MinGW
Next Topic:break point
Goto Forum:
  


Current Time: Wed Sep 28 15:07:52 GMT 2022

Powered by FUDForum. Page generated in 0.03830 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top