mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 423731 - Cannot start debugging with Apple-gdb, -gdb-set language
fails Change-Id: Ifd0cb77a0b3c9142f0ee60cf9a6477ebbfefe323 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewed-on: https://git.eclipse.org/r/19629 Tested-by: Hudson CI Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
2d9f3f1028
commit
475d44a366
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Philippe Gil (AdaCore) - Initial API and implementation
|
||||
* Marc-Andre Laperle (Ericsson) - Fix parsing for old versions of GDB
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.dsf.mi.service.command.output;
|
||||
|
@ -19,6 +20,10 @@ package org.eclipse.cdt.dsf.mi.service.command.output;
|
|||
* -gdb-show language
|
||||
* ^done,value="auto"
|
||||
*
|
||||
* GDB 6.2-6.8:
|
||||
* -gdb-show language
|
||||
* ^done,value="auto; currently c"
|
||||
*
|
||||
* the different returned values are:
|
||||
*
|
||||
* (gdb) help set language
|
||||
|
@ -80,6 +85,13 @@ public class MIGDBShowLanguageInfo extends MIInfo {
|
|||
MIValue value = results[i].getMIValue();
|
||||
if (value instanceof MIConst) {
|
||||
fLanguage = ((MIConst)value).getString();
|
||||
|
||||
// Some versions of GDB (6.2-6.8) output "auto; currently c"
|
||||
// so we need to remove the semicolon part
|
||||
int semiColonIdx = fLanguage.indexOf(';');
|
||||
if (semiColonIdx != -1) {
|
||||
fLanguage = fLanguage.substring(0, semiColonIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue