Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348091 - [launch] Cannot launch hardware or post-mortem debugging for older GDBs when preference for non-stop is enabled
Summary: [launch] Cannot launch hardware or post-mortem debugging for older GDBs when ...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0.1   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 350502
  Show dependency tree
 
Reported: 2011-06-02 11:46 EDT by Marc Khouzam CLA
Modified: 2011-08-05 16:25 EDT (History)
4 users (show)

See Also:
eclipse.sprigogin: review+


Attachments
Fix that disables non-stop automatically for post-mortem and hardware launches (5.33 KB, patch)
2011-08-05 15:15 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Patch for cdt_8_0 (6.54 KB, patch)
2011-08-05 15:32 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-06-02 11:46:41 EDT
With bug 347245 we now have a preference to default the value for non-stop mode.

If I turn that preference to enabled, and launch a hardware debug session with GDB <= 6.8, the launch will abort with:

!MESSAGE Non-stop mode is only supported starting with GDB 6.8.50

The problem is that the hardware launch delegate re-uses GdbLaunchDelegate, which checks if non-stop is allowed, and that the hardware launch does not have any UI to enable/disable non-stop.  Therefore, we use the preference value to know if non-stop should be on, and things fail.

For non-hardware launches, it is up to the user to disable non-stop for any launch using GDB <= 6.8.  But for those launches there is a UI.
Comment 1 Marc Khouzam CLA 2011-06-02 11:47:28 EDT
The workaround for now is to make the preference for non-stop to be disabled in this case of an older GDB for hardware debug
Comment 2 John Dallaway CLA 2011-06-02 12:36:40 EDT
(In reply to comment #1)

> The workaround for now is to make the preference for non-stop to be disabled in
> this case of an older GDB for hardware debug

I have the global preference for non-stop mode disabled (unchecked) and I can confirm that non-stop mode is not enabled in GDBJtagDSFFinalLaunchSequence. However, the bad behaviour reported in bug 348043 when using GDB 6.8.x is still observed.
Comment 3 Marc Khouzam CLA 2011-06-21 14:28:37 EDT
Same problem for post-mortem launches of older GDBs
Comment 4 Marc Khouzam CLA 2011-08-05 15:15:54 EDT
Created attachment 201017 [details]
Fix that disables non-stop automatically for post-mortem and hardware launches

Now that we have a preference that can enable non-stop automatically, this patch disables non-stop in the case of post-mortem and hardware launches.  For those launches, non-stop is not applicable and cannot be disabled by the user.

This avoid running into the problem of a debug session with GDB 6.8 failing to start because it does not support non-stop.
Comment 5 Marc Khouzam CLA 2011-08-05 15:16:16 EDT
I'll commit the patch to both master and cdt_8_0
Comment 6 Marc Khouzam CLA 2011-08-05 15:32:50 EDT
Created attachment 201018 [details]
Patch for cdt_8_0

When testing, I realized that cdt_8_0 was a little different and needed some extra changes.  The problem was that fIsNonStopSession was being set in getLaunch() which is called before preLaunchCheck().  Therefore, we hadn't force non-stop to off yet, and things would abort again.

In Bug 339550, I moved the use of fIsNonStopSession to much later, which is what I did in this patch.
Comment 7 Marc Khouzam CLA 2011-08-05 15:36:55 EDT
Sergey can you review?
Comment 8 Sergey Prigogin CLA 2011-08-05 16:11:33 EDT
In GdbLaunchDelegate.java and GDBJtagDSFLaunchConfigurationDelegate.java:
turn if off -> turn it off
Comment 9 CDT Genie CLA 2011-08-05 16:23:02 EDT
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 348091: Cannot launch hardware or post-mortem debugging for older GDBs when preference for non-stop is enabled

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=db62a47f3e60cca608b8c7bbd5a00afd27805086
Comment 10 CDT Genie CLA 2011-08-05 16:23:03 EDT
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 348091: Cannot launch hardware or post-mortem debugging for older GDBs when preference for non-stop is enabled

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=e1505b889963d9dc944ded4f26ae9390d639c712
Comment 11 Marc Khouzam CLA 2011-08-05 16:25:39 EDT
(In reply to comment #8)
> In GdbLaunchDelegate.java and GDBJtagDSFLaunchConfigurationDelegate.java:
> turn if off -> turn it off

Thanks, I changed it.