mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Bug 367788: maint set python print-stack has been removed from GDB 7.4
This commit is contained in:
parent
4edaac8cdd
commit
c42f98e333
2 changed files with 50 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2011 Ericsson and others.
|
||||
* Copyright (c) 2008, 2012 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -9,6 +9,7 @@
|
|||
* Ericsson - initial API and implementation
|
||||
* Nokia - create and use backend service.
|
||||
* Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 237306)
|
||||
* Marc Khouzam (Ericsson) - Support for GDB 7.4 (Bug 367788)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.service;
|
||||
|
||||
|
@ -29,6 +30,7 @@ import org.eclipse.cdt.dsf.gdb.service.command.CommandFactory_6_8;
|
|||
import org.eclipse.cdt.dsf.gdb.service.command.GDBControl;
|
||||
import org.eclipse.cdt.dsf.gdb.service.command.GDBControl_7_0;
|
||||
import org.eclipse.cdt.dsf.gdb.service.command.GDBControl_7_2;
|
||||
import org.eclipse.cdt.dsf.gdb.service.command.GDBControl_7_4;
|
||||
import org.eclipse.cdt.dsf.mi.service.CSourceLookup;
|
||||
import org.eclipse.cdt.dsf.mi.service.IMIBackend;
|
||||
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
|
||||
|
@ -56,6 +58,10 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
|||
/** @since 4.1 */
|
||||
public static final String GDB_7_2_1_VERSION = "7.2.1"; //$NON-NLS-1$
|
||||
|
||||
// Keep private until GDB 7.4 is released and we can change the constant
|
||||
// to its proper value of 7.4
|
||||
private static final String GDB_7_4_VERSION = "7.3.50"; //$NON-NLS-1$
|
||||
|
||||
private final String fVersion;
|
||||
|
||||
public GdbDebugServicesFactory(String version) {
|
||||
|
@ -112,6 +118,9 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
|||
}
|
||||
|
||||
protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) {
|
||||
if (GDB_7_4_VERSION.compareTo(fVersion) <= 0) {
|
||||
return new GDBControl_7_4(session, config, new CommandFactory_6_8());
|
||||
}
|
||||
if (GDB_7_2_VERSION.compareTo(fVersion) <= 0) {
|
||||
return new GDBControl_7_2(session, config, new CommandFactory_6_8());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Marc Khouzam (Ericsson) - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.service.command;
|
||||
|
||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
|
||||
/**
|
||||
* With GDB 7.4, the command 'maintenance set python print-stack' is not supported.
|
||||
* The new command "set python print-stack none|full|message" has replaced it, with
|
||||
* the default being 'message'. With this new default
|
||||
* @since 4.1
|
||||
*/
|
||||
public class GDBControl_7_4 extends GDBControl_7_2 implements IGDBControl {
|
||||
public GDBControl_7_4(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
|
||||
super(session, config, factory);
|
||||
setUseThreadGroupOptions(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPrintPythonErrors(boolean enabled, RequestMonitor rm) {
|
||||
// With GDB 7.4, the command 'maintenance set python print-stack' is not supported.
|
||||
// The new command "set python print-stack none|full|message" has replaced it, with
|
||||
// the default being 'message'. This new default is good enough for us, so no
|
||||
// need to do anything anymore.
|
||||
// Bug 367788
|
||||
rm.done();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue