mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 113107: Make trace logs more readily available.
This commit is contained in:
parent
9fe6b60793
commit
e8636fc099
6 changed files with 64 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-04-16 Mikhail Khodjaiants
|
||||
Bug 113107: Make trace logs more readily available.
|
||||
* AbstractGDBCDIDebugger.java
|
||||
* IMILaunchConfigurationConstants.java
|
||||
|
||||
2006-04-13 Mikhail Khodjaiants
|
||||
Bug 113107: Make trace logs more readily available.
|
||||
Core support for the "Verbose Mode" action.
|
||||
|
|
|
@ -62,6 +62,7 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
|
|||
if ( monitor.isCanceled() ) {
|
||||
throw new OperationCanceledException();
|
||||
}
|
||||
boolean verboseMode = verboseMode( launch.getLaunchConfiguration() );
|
||||
Session session = createGDBSession( launch, executable, monitor );
|
||||
if ( session != null ) {
|
||||
try {
|
||||
|
@ -72,6 +73,7 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
|
|||
IProcess debuggerProcess = createGDBProcess( (Target)targets[i], launch, debugger, renderDebuggerProcessLabel( launch ), null );
|
||||
launch.addProcess( debuggerProcess );
|
||||
}
|
||||
((Target)targets[i]).enableVerboseMode( verboseMode );
|
||||
((Target)targets[i]).getMISession().start();
|
||||
}
|
||||
doStartSession( launch, session, monitor );
|
||||
|
@ -197,4 +199,15 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
|
|||
protected IProcess createGDBProcess( Target target, ILaunch launch, Process process, String label, Map attributes ) {
|
||||
return new GDBProcess( target, launch, process, label, attributes );
|
||||
}
|
||||
|
||||
protected boolean verboseMode( ILaunchConfiguration config ) {
|
||||
boolean result = IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT;
|
||||
try {
|
||||
return config.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, result );
|
||||
}
|
||||
catch( CoreException e ) {
|
||||
// use default
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,8 +69,18 @@ public interface IMILaunchConfigurationConstants {
|
|||
public static final String ATTR_DEBUGGER_COMMAND_FACTORY = MIPlugin.getUniqueIdentifier() + ".commandFactory"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* launch configuration attribute key. The value is a string specifying the protocol to
|
||||
* Launch configuration attribute key. The value is a string specifying the protocol to
|
||||
* use. For now only "mi", "mi1", "m2", "mi3" are supported.
|
||||
*/
|
||||
public static final String ATTR_DEBUGGER_PROTOCOL = MIPlugin.getUniqueIdentifier() + ".protocol"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Launch configuration attribute key. The value is a boolean specifying the mode of the gdb console.
|
||||
*/
|
||||
public static final String ATTR_DEBUGGER_VERBOSE_MODE = MIPlugin.getUniqueIdentifier() + ".verboseMode"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Launch configuration attribute value. The key is ATTR_DEBUGGER_VERBOSE_MODE.
|
||||
*/
|
||||
public static final boolean DEBUGGER_VERBOSE_MODE_DEFAULT = false;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-04-16 Mikhail Khodjaiants
|
||||
Bug 113107: Make trace logs more readily available.
|
||||
* MIUIMessages.properties
|
||||
* StandardGDBDebuggerPage.java
|
||||
|
||||
2006-04-13 Mikhail Khodjaiants
|
||||
Bug 113107: Make trace logs more readily available.
|
||||
Implementation of the "Verbose Mode" action.
|
||||
|
|
|
@ -36,6 +36,7 @@ StandardGDBDebuggerPage.9=(Warning: Some commands in this file may interfere wit
|
|||
StandardGDBDebuggerPage.10=Shared Libraries
|
||||
StandardGDBDebuggerPage.11=Protocol:
|
||||
StandardGDBDebuggerPage.12=GDB command set:
|
||||
StandardGDBDebuggerPage.13=Verbose console mode
|
||||
GDBServerDebuggerPage.0=TCP
|
||||
GDBServerDebuggerPage.1=Serial
|
||||
GDBServerDebuggerPage.10=Connection
|
||||
|
|
|
@ -60,6 +60,8 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
|||
|
||||
protected Combo fProtocolCombo;
|
||||
|
||||
protected Button fVerboseModeButton;
|
||||
|
||||
private IMILaunchConfigurationComponent fSolibBlock;
|
||||
|
||||
private CommandFactoryDescriptor[] fCommandFactoryDescriptors;
|
||||
|
@ -81,6 +83,7 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
|||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT );
|
||||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT );
|
||||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, MIPlugin.getDefault().getCommandFactoryManager().getDefaultDescriptor( getDebuggerIdentifier() ).getIdentifier() );
|
||||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT );
|
||||
if ( fSolibBlock != null )
|
||||
fSolibBlock.setDefaults( configuration );
|
||||
}
|
||||
|
@ -157,7 +160,14 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
|||
}
|
||||
}
|
||||
fProtocolCombo.select( miIndex );
|
||||
|
||||
boolean verboseMode = IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT;
|
||||
try {
|
||||
verboseMode = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, IMILaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT );
|
||||
}
|
||||
catch( CoreException e ) {
|
||||
// use default
|
||||
}
|
||||
fVerboseModeButton.setSelection( verboseMode );
|
||||
setInitializing( false );
|
||||
}
|
||||
|
||||
|
@ -176,6 +186,7 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
|||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, str );
|
||||
if ( fSolibBlock != null )
|
||||
fSolibBlock.performApply( configuration );
|
||||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE, fVerboseModeButton.getSelection() );
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
@ -312,6 +323,7 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
|||
options.setLayoutData( gd );
|
||||
createCommandFactoryCombo( options );
|
||||
createProtocolCombo( options );
|
||||
createVerboseModeButton( subComp );
|
||||
}
|
||||
|
||||
public void createSolibTab( TabFolder tabFolder ) {
|
||||
|
@ -399,4 +411,20 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
|||
}
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
protected void createVerboseModeButton( Composite parent ) {
|
||||
fVerboseModeButton = createCheckButton( parent, MIUIMessages.getString( "StandardGDBDebuggerPage.13" ) ); //$NON-NLS-1$
|
||||
fVerboseModeButton.addSelectionListener( new SelectionListener() {
|
||||
|
||||
public void widgetDefaultSelected( SelectionEvent e ) {
|
||||
if ( !isInitializing() )
|
||||
updateLaunchConfigurationDialog();
|
||||
}
|
||||
|
||||
public void widgetSelected( SelectionEvent e ) {
|
||||
if ( !isInitializing() )
|
||||
updateLaunchConfigurationDialog();
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue