mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for PR 45534: gdb/MI error in retrieving a register can lead to an empty register pane.
This commit is contained in:
parent
a95faa4dbe
commit
f61ea0d841
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-10-26 Mikhail Khodjaiants
|
||||||
|
Fix for PR 45534: gdb/MI error in retrieving a register can lead to an empty register pane.
|
||||||
|
* CRegister.java
|
||||||
|
* CRegisterGroup.java
|
||||||
|
|
||||||
2003-10-23 Mikhail Khodjaiants
|
2003-10-23 Mikhail Khodjaiants
|
||||||
Core support of the new workbench preferences: 'Source Locations' and 'Search
|
Core support of the new workbench preferences: 'Source Locations' and 'Search
|
||||||
For Duplicate Source Files'.
|
For Duplicate Source Files'.
|
||||||
|
|
|
@ -8,6 +8,7 @@ package org.eclipse.cdt.debug.internal.core.model;
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
import org.eclipse.cdt.debug.core.ICDebugConstants;
|
import org.eclipse.cdt.debug.core.ICDebugConstants;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
||||||
import org.eclipse.debug.core.DebugException;
|
import org.eclipse.debug.core.DebugException;
|
||||||
import org.eclipse.debug.core.model.IRegister;
|
import org.eclipse.debug.core.model.IRegister;
|
||||||
import org.eclipse.debug.core.model.IRegisterGroup;
|
import org.eclipse.debug.core.model.IRegisterGroup;
|
||||||
|
@ -21,6 +22,14 @@ import org.eclipse.debug.core.model.IValue;
|
||||||
*/
|
*/
|
||||||
public class CRegister extends CGlobalVariable implements IRegister
|
public class CRegister extends CGlobalVariable implements IRegister
|
||||||
{
|
{
|
||||||
|
public static class ErrorRegister extends ErrorVariable implements ICDIRegister
|
||||||
|
{
|
||||||
|
public ErrorRegister( ICDIVariableObject varObject, Exception e )
|
||||||
|
{
|
||||||
|
super( varObject, e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for CRegister.
|
* Constructor for CRegister.
|
||||||
* @param parent
|
* @param parent
|
||||||
|
|
|
@ -93,16 +93,16 @@ public class CRegisterGroup extends CDebugElement implements IRegisterGroup
|
||||||
private ICDIRegister[] getCDIRegisters() throws DebugException
|
private ICDIRegister[] getCDIRegisters() throws DebugException
|
||||||
{
|
{
|
||||||
ICDIRegister[] results = new ICDIRegister[fRegisterObjects.length];
|
ICDIRegister[] results = new ICDIRegister[fRegisterObjects.length];
|
||||||
try
|
for ( int i = 0; i < fRegisterObjects.length; ++i )
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < fRegisterObjects.length; ++i )
|
try
|
||||||
{
|
{
|
||||||
results[i] = ((CDebugTarget)getDebugTarget()).getCDISession().getRegisterManager().createRegister( fRegisterObjects[i] );
|
results[i] = ((CDebugTarget)getDebugTarget()).getCDISession().getRegisterManager().createRegister( fRegisterObjects[i] );
|
||||||
}
|
}
|
||||||
}
|
catch( CDIException e )
|
||||||
catch( CDIException e )
|
{
|
||||||
{
|
results[i] = new CRegister.ErrorRegister( fRegisterObjects[i], e );
|
||||||
targetRequestFailed( e.getMessage(), null );
|
}
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue