mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
- fixed module loading to avoid wrong error reported
This commit is contained in:
parent
1c95fb3c77
commit
d2cba6c8c9
1 changed files with 19 additions and 10 deletions
|
@ -11,6 +11,8 @@
|
||||||
package org.eclipse.cdt.debug.internal.core.model;
|
package org.eclipse.cdt.debug.internal.core.model;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.IAddress;
|
import org.eclipse.cdt.core.IAddress;
|
||||||
import org.eclipse.cdt.core.IAddressFactory;
|
import org.eclipse.cdt.core.IAddressFactory;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
||||||
|
@ -272,16 +274,23 @@ public class CModule extends CDebugElement implements ICModule {
|
||||||
return fCElement;
|
return fCElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadSymbolsFromFile( IPath path ) throws DebugException {
|
private void loadSymbolsFromFile(IPath path) throws DebugException {
|
||||||
if ( path == null || path.isEmpty() ) {
|
if (fCDIObject instanceof ICDISharedLibrary) {
|
||||||
requestFailed( CoreModelMessages.getString( "CModule.2" ), null ); //$NON-NLS-1$
|
if (path == null || path.isEmpty()) {
|
||||||
}
|
requestFailed(CoreModelMessages.getString("CModule.2"), null); //$NON-NLS-1$
|
||||||
else if ( fCDIObject instanceof ICDISharedLibrary && path.equals( getSymbolsFileName() )) {
|
} else {
|
||||||
try {
|
if (path.equals(getSymbolsFileName())) {
|
||||||
((ICDISharedLibrary)fCDIObject).loadSymbols();
|
try {
|
||||||
}
|
((ICDISharedLibrary) fCDIObject).loadSymbols();
|
||||||
catch( CDIException e ) {
|
} catch (CDIException e) {
|
||||||
targetRequestFailed( e.getMessage(), null );
|
targetRequestFailed(e.getMessage(), null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String message = MessageFormat.format( //
|
||||||
|
CoreModelMessages.getString("CModule.5"), //$NON-NLS-1$
|
||||||
|
new Object[] { path.toString() });
|
||||||
|
targetRequestFailed(message, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue