| Summary: | GDB MI parser in CDT/DSF is broken on Windows | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Stefan Bylund <steby> | ||||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Project Inbox <cdt-debug-dsf-gdb-inbox> | ||||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cdtdoug, pawel.1.piech, steby | ||||||
| Version: | 8.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=356085 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Stefan Bylund
Created attachment 202321 [details]
Simple test program for exemplifying the bug
Created attachment 202322 [details]
Patch for org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java
Note that this bug appears both in DSF's and CDI's GDB support but this bug report focuses on DSF (see bug 356085 for the corresponding CDI bug report and fix). This is a duplicate of Bug 327766. I won't mark as duplicate though because the proposed patch is different and could maybe be ok for Windows. Note that you can somewhat fix this issue by adding the line set new-console on to a gdbinit file for your launch. Can you explain in detail what the regexp is attempting to do? If it specific enough not to break other outputs, we may be able to use it. I'm downgrading the severity to normal since there is somewhat of a workaround. The regular expression in the patch aims to embody the most important aspects of the GDM MI output grammar needed for identifying any non-newline-terminated output from the debugged program preceding a line of GDB MI output in order to be able to separate them. The regular expression looks like this: "(.*?)([0-9]*(\\*(stopped|running)|=(thread|library)-|\\^(done|running|connected|error|exit)).*|[~@&]\".*\"|\\(gdb\\))" The regular expression matches the following: * any preceding non-newline-terminated output from the debugged program * optional token * exec-async-output or notify-async-output or result-record or * console-stream-output or target-stream-output or log-stream-output or * prompt The GDB/MI output grammar is defined in section 27.2.2 "GDB/MI Output Syntax" in the document "Debugging with GDB", available here: http://sourceware.org/gdb/download/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax Is there any chance of having this fix included in CDT 8.0.1? Can I do anything to facilitate that? (In reply to comment #7) > Is there any chance of having this fix included in CDT 8.0.1? Can I do anything > to facilitate that? Sorry, but we are passed RC3 so it would be too big a risk. But we can aim for 8.0.2 |