Bug 299452 - Reverse debugging should not be selectable if Non-stop is selected
Summary: Reverse debugging should not be selectable if Non-stop is selected
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 6.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 21:01 EST by Marc-André Laperle CLA
Modified: 2020-09-04 15:19 EDT (History)
3 users (show)

See Also:


Attachments
Disable reverse debugging if non-stop is checked (2.29 KB, patch)
2010-01-12 21:05 EST, Marc-André Laperle CLA
no flags Details | Diff
Improved patch (4.32 KB, patch)
2010-01-31 15:08 EST, Marc-André Laperle CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2010-01-12 21:01:52 EST
GDB doesn't support reverse debugging when non-stop mode is enabled. Currently, if both are selected in the debug configuration page, reverse debugging won't work and nothing is done to inform the user about this. This is confusing for users who are not familiar with those features (like me!). I suggest disabling the Reverse debugging check box and setting its value to false when Non-stop is checked. That way, the user will not expect the reverse debugging to work.
Comment 1 Marc-André Laperle CLA 2010-01-12 21:05:52 EST
Created attachment 155946 [details]
Disable reverse debugging if non-stop is checked

Patch for 6.0.2 and 6.1 (aka 7.0).
Comment 2 Marc Khouzam CLA 2010-01-13 08:22:24 EST
Thanks.
My worry about this solution is that I wonder why we prioritize non-stop over reverse?  For example, if the user selects reverse first, why don't we disable non-stop?

Maybe also adding a string to explain why the text box is disabled.  I can see getting questions about the reverse checkbox being disabled just as much as the reverse toggle button.
Comment 3 Marc-André Laperle CLA 2010-01-31 15:08:48 EST
Created attachment 157718 [details]
Improved patch

Thanks for the comments, this patch should be better.
Comment 4 Marc-André Laperle CLA 2011-07-22 13:36:12 EDT
Marc, do you still think this is a good idea? If so, I can update the patch. If not, I will mark this as INVALID.
Comment 5 Marc Khouzam CLA 2011-07-22 13:44:34 EDT
Thinking about it some more I got to thinking this patch would cause a problem if GDB ever does support reverse and non-stop.  The limitation is not from CDT but from GDB.

Say GDB 7.4 does support reverse and non-stop, then we won't have a solution that will work for both GDB 7.4 and older GDBs.

One thing we should use more are notifications to the user when something fails.  How about a warning dialog when the launch session is started and we confirm that the GDB version used does not support both options?

Or is that not user friendly enough?
Comment 6 Alvaro Sanchez-Leon CLA 2013-06-03 19:22:41 EDT
Adding me to the list of non familiar users, 

I was quite puzzled on why the reverse debugging toggle button is disabled and did not figure out it was related to the settings of non-stop mode, can this e.g. be reflected in the tooltip of the toggle button ?
Comment 7 Eclipse Genie CLA 2016-02-27 21:08:15 EST
New Gerrit change created: https://git.eclipse.org/r/67498
Comment 8 Eclipse Genie CLA 2016-02-27 21:08:19 EST
New Gerrit change created: https://git.eclipse.org/r/67499
Comment 9 Marc Khouzam CLA 2016-02-27 21:12:28 EST
(In reply to Marc Khouzam from comment #5)
> How about a warning dialog when the launch session is started and we
> confirm that the GDB version used does not support both options?

The following patch does that; which is to pop-up a dialog and fail the session.
> New Gerrit change created: https://git.eclipse.org/r/67498
Comment 10 Marc Khouzam CLA 2016-02-27 21:13:56 EST
(In reply to Eclipse Genie from comment #8)
> New Gerrit change created: https://git.eclipse.org/r/67499

The above patch add a dialog warning when a breakpoint is hit which has an action to enable/disable reverse debugging but fails to do it (e.g., if it is a non-stop session).