Weird debug perspective behaviour (buggy GDB console/variables view) [message #1728485] |
Mon, 04 April 2016 19:28 |
Nicolas Rochette Messages: 3 Registered: April 2016 |
Junior Member |
|
|
Hello all,
I have been struggling for hours with a serious bug in the debug perspective. I have not been able to find any related posts, here or elsewhere, and I would very much appreciate any help to resolve it. I would much rather solve it than have to go back to GDB's command line mode, as Eclipse's interface is so nice.
I am using a fresh Eclipse 4.5 "Mars" & CDT 8.7 installation, along with GCC 5.2.1 and GDB 7.10, under Ubuntu 15.10.
Overall everything works fine, except that I run into the following unrecoverable state (attached screenshot) when setting a breakpoint in "main()" :
- Variables are not displayed properly : the Variables panel comprises an unpredictable number of blank (but existing and selectable) lines, and trying to explore non-blank containers (if any) only lead to more blank lines (see screenshot).
- The GDB console is unresponsive, i.e. typing "print argc", "info locals" or any other command does not seem to do anything.
- The thread is unresponsive. The "Restart" and "Terminate" buttons are unresponsive (they become shaded on click but do not seem to do anything).
- Terminating the application (same button, but on the "application" line and not the "thread" line) works after a little while.
- Debug-unrelated Eclipse functions otherwise work normally.
The issue seems to be specific to "main()". i.e. as long as I do not put breakpoints in "main()" everything appears to works fine.
Importantly, I have tried using GDB from the command line but as far as I can tell, the behaviour was normal. I also do not thing there is anything remarkably fancy with my program, and the version used to reproduce the bug works and is publicly released and used.
I attach the GDB trace. I did not find any error that might explain this behaviour but I must admit that I am not used to this format.
Thanks a lot,
Nicolas
-
Attachment: CDT_debug.png
(Size: 389.90KB, Downloaded 557 times) -
Attachment: gdb_trace
(Size: 93.50KB, Downloaded 204 times)
[Updated on: Tue, 05 April 2016 14:41] Report message to a moderator
|
|
|
|
|
|
Re: Weird debug perspective behaviour (buggy GDB console/variables view) [message #1729510 is a reply to message #1728708] |
Thu, 14 April 2016 22:05 |
Nicolas Rochette Messages: 3 Registered: April 2016 |
Junior Member |
|
|
Hi again,
So either (1) disabling "pretty printers in variable/expression tree" in Prefs/C++/Debug/GDB or (2) moving the variable declarations to the beginning of the block indeed restored a sane behavior. I guess I will go with solution (1) then. Although it is still unsatisfying, the console still works and has pretty printing, and being able to set breakpoints through eclipse is still great. Solution (2) is of course out of the question...
Interestingly the issue seems to be restricted to std::set -- in particular, std::map does not seem to be affected. The template type doesn't seem to matter : at least set<int> and set<string> cause the problem.
As far as my testing goes :
map<int,int> foo;
set<int> bar;
//break
// (works)
set<int> bar;
//break
map<int,int> foo;
// (works) map<int,int> foo;
//break
set<int> bar;
// (bugs)
Also, I could reproduce the problem in functions other than main() by declaring unused set<int> variables.
Thanks again for the hints.
p.s. This is with "Eclipse IDE for C/C++ developers" 4.5.2 and CDT 8.8.1. See attached "Installation details" screenshot for other pieces.
[Updated on: Thu, 14 April 2016 22:16] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03442 seconds