| Summary: | Safer to explicitly set 'target-async off' | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc Khouzam <marc.khouzam> | ||||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Marc Khouzam <marc.khouzam> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Marc Khouzam <marc.khouzam> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cdtdoug, nobody, pawel.1.piech, vladimir.prus | ||||||
| Version: | 8.0 | Flags: | nobody:
review+
|
||||||
| Target Milestone: | 8.0.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marc Khouzam
Created attachment 208779 [details]
Fix for DSF-GDB for master
This patch creates a new FinalLaunchSequence_7_0 to handle non-stop and target-async, since the command to set target-async was not available before GDB 7.0.
The patch also explicitly sets target-async to off in all-stop mode.
This patch only addresses DSF-GDB.
Committed to master.
Created attachment 208780 [details]
Fix for DSF-GDB for cdt_8_0
This fix is for the cdt_8_0 branch. It is different to avoid adding new APIs. The solution is actually much simpler but more of a hack. I think it is still better than nothing so I have committed it to cdt_8_0.
Mikhail, can you review this fix? Also, do you have a recommendation for CDI? If GDB does set target-async on by default, I believe it will cause problems in CDI. A workaround is that the user will need to add set target-async off in their gdbinit file. Should we put a fix in CDI, or should we wait to see if it is needed? Is there an easy way to handle the fact that 'set target-async off' will fail for GDBs older than 7.0? Maybe using the commandFactory? (In reply to comment #3) > Mikhail, can you review this fix? > The patch seems to be OK. > Also, do you have a recommendation for CDI? > If GDB does set target-async on by default, I believe it will cause problems in > CDI. > > A workaround is that the user will need to add > set target-async off > in their gdbinit file. > > Should we put a fix in CDI, or should we wait to see if it is needed? Is there > an easy way to handle the fact that 'set target-async off' will fail for GDBs > older than 7.0? Maybe using the commandFactory? I added 'set target-async on' to the current CDI launcher and it works fine. I don't see any differences from the previous non-async behavior. (In reply to comment #4) > The patch seems to be OK. Thanks > I added 'set target-async on' to the current CDI launcher and it works fine. I > don't see any differences from the previous non-async behavior. Try interrupting a running thread. ^C won't work in async-mode. (In reply to comment #5) > Try interrupting a running thread. ^C won't work in async-mode. Yes, that doesn't work. I think it would be enough just to turn the async mode off for all CDI sessions regardless of the GDB version. ^C might not work. -exec-interrupt does. (In reply to comment #7) > ^C might not work. -exec-interrupt does. Thanks Vladimir. I'll look at it after holidays. FAOD, -exec-interrupts works *only* in async mode. Also, re the topic, I think that async mode is generally OK these days. While non-stop requires specific per-target support to be fully robust, async mode is a host-side feature, with both Linux and Windows adequately supported. Mikhail, do we want this fixed for CDI for Juno? (In reply to comment #10) > Mikhail, do we want this fixed for CDI for Juno? I'll try. Marc, this is fixed for DSF/GDB in 8.0.2, right? If so, we need to reassign it to DSF and close. To track the same issue fro CDI, I created a new bug - https://bugs.eclipse.org/bugs/show_bug.cgi?id=379043. (In reply to comment #12) > Marc, this is fixed for DSF/GDB in 8.0.2, right? If so, we need to reassign it > to DSF and close. To track the same issue fro CDI, I created a new bug - > https://bugs.eclipse.org/bugs/show_bug.cgi?id=379043. Perfect! Thanks. |