MAC OSX ECLIPSE C/C++ Debugger does not seem to stop at breakpoint [message #1837923] |
Wed, 10 February 2021 16:30 |
G Gad 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05524 seconds