1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

Bug 117754: Stack frame can't display address.

This commit is contained in:
Mikhail Khodjaiants 2005-11-23 19:52:33 +00:00
parent 847a638e03
commit 4075cacd7d
2 changed files with 25 additions and 16 deletions

View file

@ -1,3 +1,7 @@
2005-11-23 Mikhail Khodjaiants
Bug 117754: Stack frame can't display address.
* CDebugModelPresentation.java
2005-10-19 Mikhail Khodjaiants 2005-10-19 Mikhail Khodjaiants
Bug 113114: Expanding Modules View throws SWTError: No more handles. Bug 113114: Expanding Modules View throws SWTError: No more handles.
* ModulesView.java * ModulesView.java

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.internal.ui;
import java.io.File; import java.io.File;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.HashMap; import java.util.HashMap;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.core.resources.FileStorage; import org.eclipse.cdt.core.resources.FileStorage;
import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit; import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
@ -856,9 +857,11 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
label.append( frame.getLevel() ); label.append( frame.getLevel() );
label.append( ' ' ); label.append( ' ' );
String function = frame.getFunction(); String function = frame.getFunction();
if ( function != null ) { if ( isEmpty( function ) ) {
label.append( CDebugUIMessages.getString( "CDTDebugModelPresentation.21" ) ); //$NON-NLS-1$
}
else {
function = function.trim(); function = function.trim();
if ( function.length() > 0 ) {
label.append( function ); label.append( function );
label.append( "() " ); //$NON-NLS-1$ label.append( "() " ); //$NON-NLS-1$
if ( frame.getFile() != null ) { if ( frame.getFile() != null ) {
@ -873,9 +876,11 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
} }
} }
} }
IAddress address = frame.getAddress();
if ( address != null ) {
label.append( ' ' );
label.append( address.toHexAddressString() );
} }
if ( isEmpty( function ) )
label.append( CDebugUIMessages.getString( "CDTDebugModelPresentation.21" ) ); //$NON-NLS-1$
return label.toString(); return label.toString();
} }
return (f.getAdapter( IDummyStackFrame.class ) != null) ? getDummyStackFrameLabel( f ) : f.getName(); return (f.getAdapter( IDummyStackFrame.class ) != null) ? getDummyStackFrameLabel( f ) : f.getName();