1
0
Fork 0
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:
Mikhail Khodjaiants 2003-10-26 22:57:08 +00:00
parent a95faa4dbe
commit f61ea0d841
3 changed files with 20 additions and 6 deletions

View file

@ -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
Core support of the new workbench preferences: 'Source Locations' and 'Search
For Duplicate Source Files'.

View file

@ -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.ICDebugConstants;
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.model.IRegister;
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 static class ErrorRegister extends ErrorVariable implements ICDIRegister
{
public ErrorRegister( ICDIVariableObject varObject, Exception e )
{
super( varObject, e );
}
}
/**
* Constructor for CRegister.
* @param parent

View file

@ -93,16 +93,16 @@ public class CRegisterGroup extends CDebugElement implements IRegisterGroup
private ICDIRegister[] getCDIRegisters() throws DebugException
{
ICDIRegister[] results = new ICDIRegister[fRegisterObjects.length];
try
{
for ( int i = 0; i < fRegisterObjects.length; ++i )
{
try
{
results[i] = ((CDebugTarget)getDebugTarget()).getCDISession().getRegisterManager().createRegister( fRegisterObjects[i] );
}
}
catch( CDIException e )
{
targetRequestFailed( e.getMessage(), null );
results[i] = new CRegister.ErrorRegister( fRegisterObjects[i], e );
}
}
return results;
}